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?
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:
Enter the sharepoint list and delete the lookup column.
Open the form and create a new multiple choice field (not lookup) inside infopath, choices doesn't matter.
Create a new data connection to the list you had the lookup column pointing to, fetch title and id.
Add the new mutiple choice field to the view, and edit the properties of the box.
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.
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.
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).
It should now validate as intended, so upload and test it.