I've seen a lot of posts on how to compare a value to v_null in order to make sure a field is not left blank. I'm trying to solve the opposite -- I need some fields to actually be blank and can't figure it out.
The variable v_null appeared in one of my blog posts 9 years ago, see that it has been taken over by many. That post has been updated recently:
Can you explain exactly what you want to do? Normally the logical expression with 'equal to v_null' should work.
Thank you so much for replying.
Our project is teaching users how to fill out specific forms. In many cases it is imperitive that the user understand that the standard is to leave a field blank vs entering a zero.
Equal to null works... but so does entering zero.
I've tried 'contains' as well, no joy.
As I tried to explain in the blogs, the workaround is due to the fact that blank, zero, all strings are considered to be not numeric and equal to 0. A variable has no type, it can be a string or numeric. Can you post a screenshot of the advanced action (use the Preview screen) you are using ? Tell which event is triggering the action and how you tested.
Each field has a cooresponding variable and a secondary variable to hold the score for that field. A simple clickbox triggers the action. It checks each field for the correct answer and assigns a score of 1 for correct. If incorrect a smartshape highlights the field. A later decision in the same action tallies them up.
Each decision is fairly simple. The user can keep trying until they get all answers correct, on submit on subsequent tries correct answers will remove the error indicator and populate the score variable.
Everything works except a zero being considered the same as null (empty).
Please, I asked for the Preview of that very long action.... Have a look at my post explaining all functionality of the Advanced Actions dialog box you are using, including the Preview button:
You can try to add a condtion=
... is not equal to 0
Thank you for your patience, and for sharing that valuable information. Understanding the preview function will save me a lot of trouble in the future.
Here is the preview. It includes the latest attempt (adding condition is not equal to 0), which didnt' work.
Oops, never wrote such a long advanced action with so many decisions, and on top of it always an ELSE part.
Think there should be a better way, or switch to JS which may be necessary anyway. Please use states instead of show/hide, will probbably make everything a lot easier.
Did you try to put the zero in anoter variable v_zero for the comparison?
No luck with the zero being in a variable. 😞
I don't disagree with you about the JS, this would be much easier that way, but unfortunately we've been told to do it without. Perhaps when my boss understands that what he wants can't be done without JS he will change his mind.
I do appreciate your help with this!
It may be possible, but I would like to simplify the advanced action. However, do not have time now, am invited to a Xmas dinner...
I'll appreciate any input you have, after the holidays. Enjoy your dinner and time with family and friends.
Thank you for all you give to this community.