Expand my Community achievements bar.

SOLVED

Options don't work with some operators

Avatar

Level 4

Hello, I'm facing a challenge that I need to tackle to be able to lower admin work on my side.
I want to use a option as below:

A_B_SE_3-1730366237999.png

 


And use it in a query like this:

A_B_SE_1-1730366121582.png

A_B_SE_2-1730366140559.png

 

A_B_SE_4-1730366310606.png


Why does this not work? Any solution?



1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hello @A_B_SE ,

Since your 'sInternalcompanycode' field is a text field, you need to compare it with text values.
So your option must contain this: '08','10','15','24','27' ...
The problem with this is that when you use the syntax $(options:nom_option)  (or even $(vars/@varibleName) and $(instance/vars/@varibleName)), Adobe adds double quotes at the beginning and at the end.
To remedy this, you can tell Adobe not to add anything by using $noescaping(options:Test) (this also works for $(vars/@varibleName) and $(instance/vars/@varibleName)).

I hope this will help you achieve what you want to do.

However, I would like to thank you warmly because you made me discover the syntax $(options:option_name) which I did not know.
Br,

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

Hello @A_B_SE ,

Since your 'sInternalcompanycode' field is a text field, you need to compare it with text values.
So your option must contain this: '08','10','15','24','27' ...
The problem with this is that when you use the syntax $(options:nom_option)  (or even $(vars/@varibleName) and $(instance/vars/@varibleName)), Adobe adds double quotes at the beginning and at the end.
To remedy this, you can tell Adobe not to add anything by using $noescaping(options:Test) (this also works for $(vars/@varibleName) and $(instance/vars/@varibleName)).

I hope this will help you achieve what you want to do.

However, I would like to thank you warmly because you made me discover the syntax $(options:option_name) which I did not know.
Br,

Avatar

Level 4

Hello Amine,

thank you for your answer. I've tried it out and it works flawlessly. Thanks!