Hi! I have a multivalue parameter f.ex. called ${fruit}
that can be e.g. ‘BANANA’, ‘APPLE’. I have a field fruit_pairs
that consist of two fruits separated by a dash e.g. ‘BANANA-KIWI’, ‘PEAR-APPLE’, ‘PEAR-KIWI’. I want to check if my field has any of my ${fruit} parameter values - I know I can use the IN()
function - but the problem is I want to differentiate if I have my parameter at the beginning or at the end of the fruit_pairs
- so e.g. when:
- no fruit from parameter
${fruit}
is in the pair → -1 - one of the
fruit
is at the beginning like in ‘BANANA-KIWI’ then → 0 - one of the
fruit
is at the end then like in ‘PEAR-APPLE’ → 1
Sometimes the fruit can be NULL
but it never happens that both fruit are in the pair e.g. ‘BANANA-APPLE’ or ‘APPLE-BANANA’.