Dropdown list options based on permissions in InfoPath
Requirement
Create a dynamic form with fields set to hide/display depending on which option the user chooses in a dropdown box. Some options need to be hidden from certain users.
Solution
- Create a Custom List in SharePoint with the drop down values you need. I use Title as the DisplayName and create an additional column called Value to use with the Drop-down List Box control in the form.
- Create your InfoPath form with a Drop-down List Box control
- Right click on the control -> Drop-Down List Box Properties
- Select -> Get choices from an external data source
- Set the Display name to ‘Title’ and the Value to ‘Value’.
- Now go back to your Custom SharePoint list, right click on the value that you want to hide from certain users -> Manage Permissions
- Stop inherting permissions on the item and add your custom permissions.
- Publish your form to a form library.
- Your Drop-Down List Box should now only show the items which users have access to.
Note:
The hidden drop down item will still show for users who open a form submitted by another person with access to that drop-down list item. They will see the ‘Value’ of the list item. This is where you should use form rules / views to prevent users from being able to view or change forms that are submitted by other users.