How to check a variable is undefined in compare variables module?
We tried the undefined, 'undefined' and '', all the choices do not works.
Any suggestions?
We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics
How to check a variable is undefined
Re: How to check a variable is undefined
The compare variables module interprets data as strings. If you wish to check for a undefined variable in Javascript, you will have to use the Evaluate JS module with code like:
Then you can check the variable with the compare variables module, since you have changed its value to the string "undefined".
However, it is not good coding convention to intentionally send undefined variables, so we would recommend rethinking your application to not rely on undefined variables.
Code: Select all
if ([variable] === undefined) { [variable] = 'undefined'; }
However, it is not good coding convention to intentionally send undefined variables, so we would recommend rethinking your application to not rely on undefined variables.
Plum Support
http://www.plumvoice.com
http://www.plumvoice.com