I'm using the query builder to create a report and want to add a custom column that tells me if the string in one column contains the string in another.
My data looks like this:
shopper_id | shop_id | shopper → fruit_wanted | shop → fruit_for_sale |
---|---|---|---|
1 | 1 | apple | apple, pear, banana |
1 | 2 | apple | kiwi, banana |
2 | 1 | banana | apple, pear, banana |
2 | 2 | banana | pear, banana |
I'm using case and contains to do this:
case(contains([shop → fruit_for_sale], [shopper → fruit_wanted]), "Match", "No Match")
I get an error when I hit visualize (see below)
Is it not allowed to use data in one column as the search string for the contains function? If I instead hardcode the search string e.g.
case(contains([shop → fruit_for_sale], "banana"), "Match", "No Match")
it works fine but isn't what I need!
There was a problem with your question
Most of the time this is caused by an invalid selection or bad input value. Double check your inputs and retry your query.
Hide error details
Here's the full error message
Input to update-string-value does not match schema: e[0;33m [(named [(named (not (= :value :field)) :value) nil nil] value) nil] e[0m