Wednesday, April 29, 2015

QuickTip: Display multiple values based on selection in InfoPath

I have a form with a selection box where the user selects a Role, and based on that Role I set a multiselect field with the predefined values, in this case Applications. What I wanted to do, was to have the checkboxes selected by default OR not display the checkboxes at all. Because this should be a list of all applications that are included when you select a specific role, so the user should not be able to check or uncheck any boxes. I select a role in the left drop down box, and all the values are shown to the right in a Multiselect box:

It does not seem possible to have all values selected in the Multiselect field, only the top value can be selected and that is not what I want. It's either ALL values or NO checkboxes. Well simple enough I chose the "ListBox" instead, that rolls up all values without checkboxes. The only downside is that you can select one or more values but I have not published the values in the fields anywhere and I am not saving them so it is fine. So the left drop down box selects a role and the listbox shows all values separated by a new line:

No comments: