I've read various other threads on here on the subject of validating fields on multiple page forms and I'm currently attempting to use the rules method where the condition checks if the fields are blank and the action sets the display mode of the continue button to disabled if they are. However, I can't seem to get it to quite work.
One problem I've encountered is if there are multiple required fields, I can seemingly add the conditions with a double ampersand as
"IsBlank(DataCardValue1.Text) && IsBlank(DataCardValue2.Text)" etc. However, I've found that if even one of the fields contain data, it seems to validate the rule and make the button active. Should these be created as separate rules? I've attempted that approach and the code for the DisplayMode seems to get bloated this way (and still doesn't work as expected).
I'm also having trouble getting the rule to validate if dropdowns contain a value. From reading other threads and documentation, I think I should be using one of the following:
- "DataCardValue1.Selected.Value = Blank()"
- "IsEmpty(DataCardValue1.Selected.Value)"
- "IsEmpty(DataCardValue1.SelectedItems.Unit)"
However, these trigger various error messages, for example:
- "Expected an operand. The formula or expression expects a valid operand. For example, you can add the operand '2' to the expression '1 + _' so that the result is '3'. Or, you can add the operand "there" to the expression '"Hi" & _' so that the result is 'Hi there'."
- "Invalid argument type. Expecting one of the following: Boolean, Number, Text"
- "Name isn't valid. This identifier isn't recognised."
- "The funtion 'IsEmpty' has some invalid arguments."
So I'm guessing there's something missing from my clauses but some of those errors don't seem relevant to what I'm trying to achieve.
I initially wrote this as a reply to one of the older threads but thought I might get more traction if I posted it as a new question. Apologies if this approach is frowned upon.