Conditional keyword for matching with another keyword


#1

hello, I am wondering if there is a way to conditional matching with another keyword,

use below as example,

if question answer 6 is equal to question answer 7, display abc, or else display xyz
question is a form field date format

the eq does not seems working here, any suggestions?

%begin_asset_question_answer_988272_q6^eq:question_answer_988272_q7%
abc
%else_asset%
xyz
%end_asset%


(Hugh McMaster) #2

What asset type are you trying to evaluate this from? The ‘Thank You’ body copy, an asset listing etc.?

It’s hard to know which keywords you need without this information.

In any case, you don’t need ‘asset’ in the first keyword, and your comparison keyword needs to be in braces.


#3

Hi Hugh, thanks for reply, I am displaying form submission value in an asset listing

from you are saying the code should be in as the following? thanks for the quick reply

%begin_question_answer_988272_q6^eq:{question_answer_988272_q7}%
abc
%else_asset%
xyz
%end_asset%


(Hugh McMaster) #4

You need to replace ‘asset’ with ‘question’ in your ‘else’ and ‘end’ keywords.

That should do the trick. If it doesn’t, try replacing ‘eq’ with ‘eq_date’.

If nothing works, try printing the the value of q6 and q7 and manually checking how they differ.


#5

Thanks Hugh, all good now

except, asset still works, but I changed to question for consistence, cheers