2

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!

2

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.

1
  • Aha, under Advanced you finally get to see the folder for the "Sales Person" field. You are my hero! Thanks Mohamed.
    – Ruth J
    Dec 9 '16 at 18:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.