I am using InfoPath 2010 to modify a SharePoint 2010 list form. The site is in a Sandboxed environment if that matters.
My form has three (3) fields that are relevant to this question - a checkbox, a people-picker and a date field. The users will use these field to certify that they have reviewed certain pieces of data on the site (and elsewhere) and found the data to be correct. I want this to be as easy as possible so that when a user checks the box, the people picker will be automatically filled with their name and the date field filled with the current date and time.
So here's what I did:
I put a rule on the checkbox so that when the user checks it:
- InfoPath sets the date field = now()
- InfoPath queries the GetUserProfileByName service (I'm not setting a query value here so GUPBN should be querying the current user, no?)
- InfoPath sets the People Picker's values to:
> AccountID = the AccountName returned by the Query
> Display Name = the PreferedName returned by the Query
> Account Type = "User" (without quotes... just a hardcoded string)
This works perfectly when entering a NEW record, but does not populate the People Picker when editing an existing record. Have any of you seen this before? Do you have any idea what might be failing?
Thanks.
Tom