Jul 23, 2024 07:15 AM
Hi,
I'm afraid I couldn't find the correct Airtable documentation on this, please point me in the direction if there ready help somewhere.
In an automation I have a conditional logic step. In that I have two conditions to be be met. One is a "type" kind of single select field, which translates to "Mini Day" in this case. This works.
The other condition tries to look for text in a rollup field. Here is the problem, I can't get it to work and can't figure out how 'contain' works. In the preview field I can see the text I'm looking for, eg "Digi-Gold", but it doesn't work when tested.
Here's a screenshot of the view:
I also tried other text strings ('perusmaksu' and 'sessio') but nothing I tried works.
What are requisites for "contain" to work? How does it work? Can I use use one condition to find several text strings, e.g. "sessio OR gold"?
Rgds,
Björn
Jul 23, 2024 08:47 AM
Hello Bjorn,
It seems that the field "Ostettu tu..." called in you condition is a lookup field not a rollup one.
And maybe you made a lookup to an "array" type field.
If so, You have two solutions.
Solution 1: Define your lookup field to call a text field
Solution 2: Modify the Lookup field "Ostettu tu..." into a rollup field using the formula:
What I do not understand is why yo
Jul 23, 2024 09:46 AM
Hello @Pascal_Gallais- ,
Thank you for your reply. First off, sorry, indeed my mistake - the supposed rollup field is a lookup.
I can't change the fields to be looked/rolled up to text, since they are product codes. So I added a rollup table, the new one being to the right in this picture:
However, the condition doesn't still catch, whatever string I use (Perusmaksu, or sessio, or Digi-Gold). Here in the picture I tried 'Perusmaksu', the first word of the first string:
I can see Airtable identifies two items, thinking this mean the two strings. But it still fails.
Is there something in the way I use or understand "contain" that is wrong?
Rgds,
Björn
Jul 23, 2024 09:55 AM
Hello Björn,
when you added your rollup field, did you apply the formula ARRAYJOIN(values, ";")
Jul 23, 2024 07:09 PM - edited Jul 23, 2024 07:09 PM
@Pascal_Gallais-This one's pretty weird. Even with "ARRAYJOIN()" the conditional still seems to fail:
I also tried doing an `ARRAYJOIN(values) & ""` to try to force it to be a string, but that didn't work either. If I use them in a "Find Record" action it works though, they just work differently within a conditional check or something?
===
@0800-grizzlycould you try using a lookup field for this? With reference to the base I linked above, a lookup field seemed to work fine with the "contains" filter
Jul 23, 2024 10:59 PM
Hi @Pascal_Gallais- ,
I had not noticed that difference, sorry to say. Was still using ARRAYUNIQUE.
Tried now with ARRAYJOIN, but as @TheTimeSavingCo noted, it doesn't work either.
Rgds,
Björn
Jul 23, 2024 11:05 PM
Hi @TheTimeSavingCo ,
Thanks for joining :).
@Pascal_Gallais- and @TheTimeSavingCo, the field I from the start couldn't get to work with "contains" is a lookup field from another table.
Given this, I didn't @TheTimeSavingCo seem to be able point a new lookup field from the same table towards this one.
Has either of you found the documentation for how "contains" behaves in an automation condition?
Rgds,
Björn
Jul 24, 2024 12:28 AM
Hi Adam,
It is stange indeed since it works fine on my side. Only difference that I can see with your test is that I sepcified a separator in the ARRAYJOIN function, separator being a semi-comma in my test.
Regards,
Pascal
Jul 24, 2024 02:08 AM
@Pascal_Gallais-
Yeap, I tried it with a separator too, `ARRAYJOIN(values, ';')`, it still didn't work for me. I've set it up in the base I linked above if you'd like to check it out
---
@0800-grizzlyWeird! In the base I linked above the lookup field works with 'contains'. Could you provide a read-only invite link to an example copy of your base as well so I can see what I can figure out?
Any chance you could provide a read-only link to your base where it works? I'd love to figure out what's going on!
Jul 24, 2024 02:12 AM
@Pascal_Gallais- , I have the same separator as you, as I can understand.
NB! As said in my other post, the lookup/rollup source is a column in another table. Could that affect the behaviour?
Rgds,
Björn