I am trying to make a change to a script. This script is associated with a Button - and when Button is tapped and script is executed, a new "Child" record of the current layout is added. The business has requested that I check the presence of data populated in a particular field, and if the field is BLANK, they want a Custom Dialog to display indicating that the record cannot be added.
I am uncertain how to cleanly check for if a data field is empty. I have used the following: = " "
My script is below - and it is not working. When the field is blank it goes right ahead to the ELSE and proceeds to add the new child record: