UDF Help Hi there. I have a question about settin...
# gooddata-cloud
b
UDF Help Hi there. I have a question about setting up a user data filter. The examples in the help docs seem to work in a scenario where only one value exists in the target field. For example: • Customer’s city has one value, such that it looks like this: City = Vancouver • Therefore, the following UDF works: {label/customer_city} = “Vancouver” But how would I construct a UDF where the target column contains an array of values? For example: • Customer city has an array of values and looks like this: City = [Vancouver, Toronto, Halifax]. • I want to define a UDF that is equivalent to {label/customer_city} contains “Vancouver” What would be an appropriate MAQL expression to accomplish this?
j
Hi Benedict, you should be able to define multiple values for the filter by separating them with a comma (,) As for using the word contains, this command is not understood. You need to define exactly what the values are and that they are actually available.
Hi Benedict, actually there should be a \ in there as well. The full command should look like this: {label/city} IN (\"Vancouver\",\"Halifax\")"
j
Also LIKE and ILIKE operator can be used in the condition
b
Great, thanks.