Within InfoPath, the ability to easily add a “People Picker” control allows for an easy-to-use interface for users, with search, and other functionality as with a People Picker used within SharePoint.
The underlying data structure is a “pc: Person” node within the XML :
It would be great if this column/field could then be promoted to a SharePoint column – and then the data within the list/library can be filtered depending on the “current user”.
BUT – if you try this, you’ll get some strange results. You CAN promote the column outside of InfoPath, but only simply data types (text field)
As the People Picker is a repeating section, you have the ‘function’ drop down also
Here’s what you get – for promoting the Account Id column :
I’ve tried a few other ways, but :
- You CAN’T promote the entire People Picker control
- You CAN’T create a ‘People or Group’ field in the list – and then choose this column (mis-matched types)
There *IS* a way to achieve this, making use of a Nintex Workflow for a quick data update.
- Don’t promote the column out of the InfoPath form
- Create a custom column within the list/library, that will be updated by a workflow
- Create a Nintex Workflow for the library – and set it to run “on update”
- Use a “Query XML” action to read the value from the InfoPath form –> Account Id
- Add an “Update Item” action to update the value back to the listitem (the newly added column)
- Fairly simple workflow – will only be a two step process
- Save and Publish the workflow
- Don’t forget to set “Start when items are modified” = Yes
When a user adds a form, or edits a form, the value within the People Picker will change.
The underlying workflow will then update the column – and you can use the [Me] keyword in SharePoint List Views – and/or filters – and users will be able to view “MY” workflows/forms.
Here’s the form – with the user chosen from Active Directory :
And – after the workflow completes – the User Account field is populated :
With that in place, you can have a filter like this :
With a very simple data update, you CAN use an InfoPath people picker within a SharePoint list/library….
Good luck – hope that helps with your project/s.