Oct 07
Promote to Person or Group Column, Sort Of…
I have spent some time in the last week developing forms in InfoPath 2007. Several of the forms used the Contact Selector control. The control was used in various ways, all of which required promoting the value of the user’s name. The requirement was to then filter this value using the [Me] filter in a custom view so that the contents of the library could be customized so that each user saw items where their name had been selected in the control.
The only problem is that MOSS does not support the promotion of a field to a column of “Person or Group” type. Through troubleshooting, I discovered that I was able to copy and paste a name into a “Person or Group” column in a Datasheet View, which got me thinking…and then it hit me!
Promote the “AccountId” to a column of “Single line of text” type.
The value that is promoted will be the User Principal Name (UPN), so DOMAIN\USER. Then use SharePoint Designer to create a simple workflow. Trigger the workflow to run whenever a new item is created in the library. Create an Action in the workflow that will update the item in the library, so that the value of the “Single line of text” column is updated to the “Person or Group” column.
Now, simply hide the text column in your view and use the [Me] Filter on the column you just updated with the SPD workflow.
One hitch is that it does not support multiple values, which is OK since the [Me] doesn’t work this way anyways.
At C/D/H, we are passionate about SharePoint. Talk your C/D/H consultant today and find out how we can help solve your InfoPath development issues and add greater value to your SharePoint deployment. For more ideas, post a comment or email me at SebastianA@cdh.com.



