How to set a rule to trip when a non required application field is left empty?

  • 1
  • Question
  • Updated 4 years ago
  • Answered
I'm trying to create a rule to display an error when a student indicates they're a K-12 student but does not fill in a (non required) supplemental question date field but there's no rule condition that I'm aware of that can specify a null value.

Is this possible? Is there a condition I can use to say "If field value == null" then display error?

Please see screenshot for more info.
Photo of Craig Connor - Saddleback College

Craig Connor - Saddleback College

  • 24 Posts
  • 2 Reply Likes

Posted 4 years ago

  • 1
Photo of William Diehl

William Diehl

  • 47 Posts
  • 5 Reply Likes
Oddly enough, the pop-up error message in the rules syntax checker is the only thing that let me know the 'null' keyword is supported :) So yes, you can use something like:

if(supp_date_01==null && enroll_status=="5")
{
    error("Blah")
}

The syntax checker will spit out what it's looking for as you type in your if statement. If you put something incorrect after the == sign, it will tell you what it was expecting to see instead. One of those things is "null"...

Also, in the rules checker, where you can enter test data, you can check the "null" box next to the variable data entry field to test null data (or just leave it blank).

Cheers!
Photo of Craig Connor - Saddleback College

Craig Connor - Saddleback College

  • 24 Posts
  • 2 Reply Likes
Perfect.  Thanks for the reply. 
Photo of Merrie Wales

Merrie Wales, Official Rep

  • 922 Posts
  • 51 Reply Likes
Thanks for the response William, it is very helpful!