Tag : field

InfoPath – Use a ‘hidden’ button to show ‘hidden’ fields

It is often useful in a form to hide certain fields that are only used in rules and calculations, however this can make troubleshooting a form with issues difficult since key data may not be displayed.  Displaying these values on the form on the other hand can cause confusion with your users.

In these situations I normally create an alternate ‘hidden’ view that displays all fields, which ‘normal’ users do not see. On one or all of the ‘visible’ views I then add a button hidden to all but me (actually, I usually use another field that has a comma separated list of people who can see the button). When this button is clicked, the alternate view opens up and you can examine all values.

As an added benefit this format allows the people who can access the button to modify any fields if needed. This is very useful in that it can allow you restart workflows at particular points or change some data without having to run a new workflow


InfoPath – Getting multiple values from a field

When dealing with fields that are defined as containing multiple values in SharePoint it may be necessary within the form (and in any workflows that could be defined) to know all the values that were selected. Use the magical ‘eval’ function to provide you with a delimited field that contains the values (if you intend to only use the combined values in a SharePoint workflow, you can use the ‘Merge’ function when promoting the fields instead of following these instructions)

Create a new field that will contain a semi-colon separated list of the values selected

104-1

Set the Default value of the field to a value similar to the one shown below to get a semi-colon delimited field (ensure that the box ‘Refresh value when formula is recalculated is checked)

104-2

If you wish to only bring specific values into the field, you can use the filter option on the field when ‘Insert Field or Group …’ is selected

104-3