Highlighted

Not equal to NULL and not equal to zero

New Here ,
Dec 23, 2019

Copy link to clipboard

Copied

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. 

 

Help! (please!)

TOPICS
Advanced, Advanced actions

Views

162

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Not equal to NULL and not equal to zero

New Here ,
Dec 23, 2019

Copy link to clipboard

Copied

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. 

 

Help! (please!)

TOPICS
Advanced, Advanced actions

Views

163

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Dec 23, 2019 0
Most Valuable Participant ,
Dec 23, 2019

Copy link to clipboard

Copied

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:

http://blog.lilybiri.com/where-is-null-in-cp2017

Can you explain exactly what you want to do? Normally the logical expression with 'equal to v_null' should work.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 23, 2019 0
New Here ,
Dec 23, 2019

Copy link to clipboard

Copied

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 23, 2019 0
Most Valuable Participant ,
Dec 23, 2019

Copy link to clipboard

Copied

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 23, 2019 0
New Here ,
Dec 23, 2019

Copy link to clipboard

Copied

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).

checking for null 01.jpgchecking for null else.jpg

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 23, 2019 0
Most Valuable Participant ,
Dec 24, 2019

Copy link to clipboard

Copied

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:

http://blog.lilybiri.com/advanced-actions-dialog-box-in-captivate-2017

You can try to add a condtion=

  ... is not equal to 0

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 24, 2019 0
New Here ,
Dec 24, 2019

Copy link to clipboard

Copied

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. 

preview-of-advanced-action 1.pngpreview-of-advanced-action2.pngpreview-of-advanced-action3.png

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 24, 2019 0
Most Valuable Participant ,
Dec 24, 2019

Copy link to clipboard

Copied

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? 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 24, 2019 0
New Here ,
Dec 24, 2019

Copy link to clipboard

Copied

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!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 24, 2019 0
Most Valuable Participant ,
Dec 24, 2019

Copy link to clipboard

Copied

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...

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 24, 2019 0
valerama LATEST
New Here ,
Dec 24, 2019

Copy link to clipboard

Copied

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 24, 2019 0