0

I have a SharePoint 2010 InfoPath list form. The form contains fields which are conditionally formatted, based on if a earlier field on the form is true or false.

Field "Were you absent", dropdown menu, with choices "Yes","No".

Conditionally required field "Reason for absence", dropdown menu, with a variety of choices. Conditional formatting makes this field required if the "Were you absent" field is set to yes.

When previewing the form, or when publishing it to SharePoint, the conditional formatting does indeed make the "Reason for absence" field required only if the "Were you absent" equals "Yes". However, making any choice from the "Reason for absence" field fails. The field is displayed with the red dashed border and the form cannot be submitted.

I have wrestled with changing the field type from "Yes/No" to "Choice" with no success. What is the secret to getting a conditionally required field to correctly pass the "required" validation?

1

As I recall in this scenario, you have to check that the Were you absent field is Yes and the the Reason for absence field is blank (or empty, I forget off the top of my head). Once it is not blank (or empty) then the validation passes and the form could be submitted.

  • Confirmed! To get a conditional validation to work, you have to set up two different clauses in the "Run if the condition is true" test: Is the triggering field true, AND, is the current field empty. – Alan M May 19 '15 at 17:26
0

Eric is right: your validation is failing because the condition is still not met.

Were you absent is equal Yes and Reason for Absence is blank

should be the validation rule because if you don't include something on the "reason for absence" field the rule is true but not satisfied

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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