Populating a field - Populate a field on a form with the logged in users name
Original Post by Sean Docherty (Imported from Ardevia Forum)
Hello
I have the following situation. I have created a form for purchase order requisitions.
On the form I have a field called Requested By. This is marked as a Mandatory field in the form.
Is there a way to populate the logged in users name into the Requested By field and then lock the field so that the user cannot edit the name in the requested By field.
Below is a link to a screen shot of the PO Requisition Form
-
Original Post by Andrii Berezovskyi (Imported from Ardevia Forum)
Hello Sean
Try next approach:
1)Customize NewForm and set Enabled expression =false for Requested By filed
2)Set [[@User.Title]] as Initial Expression for Requested By filed
see screenshot0 -
Original Post by Sean Docherty (Imported from Ardevia Forum)
Thank you for your reply on this question.
The solution that you provided works perfectly.
The only other question that I have is, is there a way to prevent the end user from changing the entry that is populated I the field. In effect locking the field after the information is populated.0 -
Original Post by Yuriy Stetsyuk (Imported from Ardevia Forum)
Hi Sean,
To disable a field on Edit Item form, add an Enabled expression on the Behavior ribbon tab. Add the following Assignment expression:
Quote:
[[RequestedBy]]!=''
where "RequestedBy" is internal name of your target field.
Note: The user still can edit the field value in Quick Edit view.
0
Please sign in to leave a comment.
Comments
3 comments