I want to make sure a value is selected from a List Lookup control.
I've tried using : isNullOrEmpty(parseLookup(ProjectLookup,True)) and can't see why this won't work.
No value is returned from the parseLookup if nothing is selected in the drop down, however isNullOrEmpty seems to think something is returned as it is never invalid.
I've also tried separating out the parselookup to a calculated value with a name and then validating that for empty. Still doesn't work.
I've also tried validating the control itself on 'ProjectLookup'. I feel like that should work as well. isNullOrEmpty(ProjectLookup) or isNullOrEmpty(self)
Not sure what else to do.
Solved! Go to Solution.
Interesting. The rule:
should do exactly what you're after. Just copy and paste the above text into your editor.
Here is the same rule in a formatting rule that turns the background into a terrible purple-ish color if the field is left blank.
This is the result when nothing is selected:
This is the result otherwise:
Well I had already tried that along with many other options. Why does this work for formatting and not for validating? Although it does bring it to their attention it doesn't stop them from leaving it blank.
So, if you're just taking the rule above, and you're putting it into a Formatting Rule and finding that it does at least work.
Switching it to Validation should also make it work for Validation.
However... There may be something else going on that is causing the form to act strangely when submitting.
Are you using a Save and Submit button or just a Save and Continue?
If you're using a Save and Submit button (which should kick off Validation Rules), do you see the control go invalid before being submitted?
If so, right before you submit the form, could you maybe press F12 to open up the Developer's Console in your browser and then see if any errors are logged once you do hit that button?
I have had an experience before that was similar to your when I put a control inside of a Repeating Section, and using the Control's properties, setup some min / max math values on it. For whatever reason, generating a new row would break the Rule System and allow me to do silly things like submit an invalid form.