InfoPath 2010 Rules Management and the People Picker
I have been getting some real time on InfoPath 2010 and currently in the process of developing a code less form. Eventually code will be added for the back end functionality, but for now I will push InfoPath to its limits. I have two issues I am trying to work through. First one is the userName() function not returning a value equal to currentuser. This most likely is related to the Active Directly account, or how it was set up. One of the new features of IP 2010 is the Contact Selector already part of the arsenal. Several things I have found seem to be related to how users are setup in Active Directory (AD). After several hours of play I was able to get a working solution. Once I had a solution I tried to make it a template part so I could make it available to everyone without configuration, which was a major fail. For some reason Microsoft felt the need to limit this functionality.
Setting this up is fairly easy once you know what has to be done. This is done through the Picker field’s task pane, “Show Advanced view” for field details.

- Right click on AccountId
- Select Properties
- Under default value, select the function
builder - Type userName() in the Insert Formula window

- Click OK
- Confirm “Refresh value when formula is recalculated” is unchecked. Doing this will ensure that this rule will only run once and not every time the form is opened.

- Click OK
- This must be repeated for the DisplayName for optimum experience
Results: The People picker will result to the person who opens the form and saves it for the first time.
Feel free to contact me with aby questions
Explore posts in the same categories: InfoPath