1

Scenario: Sharepoint form created in infopath with multiple views. One multiple choice lookup column needs to be "Cannot be blank" for only one of the views. I have removed the ribbon save button and added my own, and put some rules on it to disable it if values are not entered correctly. This works for all validation conditions except for this multiple choice lookup field, were the field is always calculated as having a value = not blank, so the save button is never disabled.

So how do I set up conditional validation on a multiple choice lookup field?

1 Answer 1

0

Had trouble finding help on this issue, so thought I might share my solution. If anybody knows an easier one I'd love to hear about it.

The solution I found is this:

  1. Enter the sharepoint list and delete the lookup column.
  2. Open the form and create a new multiple choice field (not lookup) inside infopath, choices doesn't matter.Add new field
  3. Create a new data connection to the list you had the lookup column pointing to, fetch title and id.
  4. Add the new mutiple choice field to the view, and edit the properties of the box.
  5. Change Choices to "Get choices from an external data source" and select the data connection you just created. I set values to id and display name to title.Choice source data
  6. Go to File > Form options > Advanced > Edit default values. Expand every row under dataFields till you see the choice field you created. Notice it has a child entry called :Value, untick the checkbox next to that. Edit default values
  7. Go back to your form and create a formatting rule on the save button. Set formatting to disable and then set up the condition by clicking "Select a field or group...", click show advanced view, and select the name of the mutiple choice field you created. Please note that if you do not select advanced view, selecting the field will default to the :Value child object of that field, the trick is to select the parent object instead (the actual mutiple choice field).Select group
  8. It should now validate as intended, so upload and test it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.