Options don't work with some operators | Community
Skip to main content
Level 4
October 31, 2024
Solved

Options don't work with some operators

  • October 31, 2024
  • 1 reply
  • 683 views

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:

 


And use it in a query like this:

 


Why does this not work? Any solution?



Best answer by Amine_Abedour

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,

1 reply

Amine_Abedour
Community Advisor
Amine_AbedourCommunity AdvisorAccepted solution
Community Advisor
October 31, 2024

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,

Amine ABEDOUR
A_B_SEAuthor
Level 4
October 31, 2024

Hello Amine,

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