Question

I am struggling in InfoPath 2013 to default a 'Sales Person' field to the current user. The field definition is Person or group - but it needs to be a form field as sometimes it might need to be overwritten.

The Rules wizard does not let me set values for a person field.

Any other options? Thanks!

Was it helpful?

Solution

Open the form, and from the ribbon choose "Data", then click on form load.

You will need to add a rule when the form is loaded, this rule will set the people picker to the value of the current logged in user.

Once you click on "Form Load" from Data section, you will see a panel that appears on the right, click new rule and choose: "Set field value". Choose the folder of your people picker, and drill down and choose "AccountId". Set the value for this field to a function, and choose "UserName". It will set the field value to the current logged in user.

You might need to add a condition at the beginning of the rule to prevent it from setting the field each time the form is open and restrict it to just for the first time it's open, all depends on your needs.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top