Hi everyone,
I’m running into a syntax / type-mismatch error when I try to use a parameter inside a contains()
filter.
What I’m trying to do
I have a text field LOC_ORIGEM with values like:
A.04.313
B.03.543
B.04.312
C.02.412
My goal is to let the reader choose a prefix (A, B, C…) and automatically filter the visuals to show only rows whose LOC_ORIGEM starts with that letter.
Parameter
- Name:
PrefixoArea
- Type: String
- Values:
A, B, C
(single select) - Control: dropdown shown in the analysis
Error message:
Expression {{argumentName}} for function {{functionName}} has incorrect argument type {{incorrectArgumentType}}.
Function syntax expects {{functionSignature}}.
Calculated field
ifelse(
contains({LOC_ORIGEM}, ${PrefixoArea}), -- this line errors
1,
0
)
Thanks in advance for any pointers!