Skip to main content

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

 

 

 

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:

ARRAYJOIN(values, ";")
 
Regards,
 
Pascal

 

What I do not understand is why yo


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:

ARRAYJOIN(values, ";")
 
Regards,
 
Pascal

 

What I do not understand is why yo


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

 

 

 

 


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:

ARRAYJOIN(values, ";")
 
Regards,
 
Pascal

 

What I do not understand is why yo


Hello Björn,

when you added your rollup field, did you apply the formula ARRAYJOIN(values, ";")

 


Hello Björn,

when you added your rollup field, did you apply the formula ARRAYJOIN(values, ";")

 


@Pascal_Gallais-This one's pretty weird.  Even with "ARRAYJOIN()" the conditional still  seems to fail:


Link to base

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


Hello Björn,

when you added your rollup field, did you apply the formula ARRAYJOIN(values, ";")

 


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


@Pascal_Gallais-This one's pretty weird.  Even with "ARRAYJOIN()" the conditional still  seems to fail:


Link to base

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


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


@Pascal_Gallais-This one's pretty weird.  Even with "ARRAYJOIN()" the conditional still  seems to fail:


Link to base

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


@TheTimeSavingCo 

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


@TheTimeSavingCo 

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


@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!


@TheTimeSavingCo 

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


@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 

 


@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 

 


@0800-grizzly , @TheTimeSavingCo 

I created the same database than Adam with two tables.

Table "user":

Table "project":

field users is a linked field to table user

field users_text is an ARRAYJOIN(values,";") on field users

field "run automation" is there to trigger the automation

field "profile" is the result of the automation, text searched being "Elaine"

- Here is the automation

It works as expected.

Main difference with your test Adam is the automation's trigger.

Regards,

Pascal


@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 

 


@Pascal_Gallais-  thank you very much!!  I tried recreating your automation and it worked fine and was very confused, and I think I've figured it out!  I think this may be due to the order of the conditionals, and so once a previous conditional is met, testing later conditionals will still result in a failure even if they pass

Here I just tested the lookup conditional:


I then test the "ARRAYUNIQUE" conditional and it fails:

If I delete the lookup conditional and just test the ARRAYUNIQUE conditional, it works!


This behaviour also persisted with using the "When record matches conditions" trigger; here's an automation link in case you'd like to try it out!

Very interesting!  (Well, to me anyway hah)
===

@0800-grizzlyLookups of lookups work with "contains" in a conditional for me; here's a link to the automation where it's working!  With reference to the text above about the orders of the conditionals, do you think that could be what's happening to you here?  If you could DM me an invite to an example copy of your base I'd love to poke around!




@Pascal_Gallais-  thank you very much!!  I tried recreating your automation and it worked fine and was very confused, and I think I've figured it out!  I think this may be due to the order of the conditionals, and so once a previous conditional is met, testing later conditionals will still result in a failure even if they pass

Here I just tested the lookup conditional:


I then test the "ARRAYUNIQUE" conditional and it fails:

If I delete the lookup conditional and just test the ARRAYUNIQUE conditional, it works!


This behaviour also persisted with using the "When record matches conditions" trigger; here's an automation link in case you'd like to try it out!

Very interesting!  (Well, to me anyway hah)
===

@0800-grizzlyLookups of lookups work with "contains" in a conditional for me; here's a link to the automation where it's working!  With reference to the text above about the orders of the conditionals, do you think that could be what's happening to you here?  If you could DM me an invite to an example copy of your base I'd love to poke around!




Hello @Pascal_Gallais-  and @TheTimeSavingCo,

My slow response is due to the mind boggling results you have come up with. Been trying to digest, and to re-create. Here's my findings so far:

  1. I can re-create the behaviour of deleting an earlier conditional and placing the "contains" conditional first, then getting the "contains" to work with a *rollup" (ARRAYJOIN with separator). 
  2. However, if after that I re-introduce another conditional before "contains" on the same rollup, it still works!!!
  3. I cannot get a "contains" conditional to work on a lookup. I realised I have two lookup steps ending with single select: Project -> Order -> Product (bought), where you @TheTimeSavingCo had success with one step. Could here be a difference? But then, @Pascal_Gallais- did not succeed with a lookup.

The whole thing with a "contains" conditional needing to be first (the first time when run?) looks like a bug to me. Do you know how to check this with Airtable, regular contact to their support?

@TheTimeSavingCo, could you re-iterate how you got "contains" to work with a conditional? Was that with a single select in the end (the thing "contains" should be compared to)?

I was preparing a test base to share, but then I couldn't get the problem to show, in that base "contains" worked also as a second conditional, but I may have done something else there, not sure.

Confusedly,

Björn


Hello @Pascal_Gallais-  and @TheTimeSavingCo,

My slow response is due to the mind boggling results you have come up with. Been trying to digest, and to re-create. Here's my findings so far:

  1. I can re-create the behaviour of deleting an earlier conditional and placing the "contains" conditional first, then getting the "contains" to work with a *rollup" (ARRAYJOIN with separator). 
  2. However, if after that I re-introduce another conditional before "contains" on the same rollup, it still works!!!
  3. I cannot get a "contains" conditional to work on a lookup. I realised I have two lookup steps ending with single select: Project -> Order -> Product (bought), where you @TheTimeSavingCo had success with one step. Could here be a difference? But then, @Pascal_Gallais- did not succeed with a lookup.

The whole thing with a "contains" conditional needing to be first (the first time when run?) looks like a bug to me. Do you know how to check this with Airtable, regular contact to their support?

@TheTimeSavingCo, could you re-iterate how you got "contains" to work with a conditional? Was that with a single select in the end (the thing "contains" should be compared to)?

I was preparing a test base to share, but then I couldn't get the problem to show, in that base "contains" worked also as a second conditional, but I may have done something else there, not sure.

Confusedly,

Björn


I think it's just to do with the order of the conditionals!  If we provide two conditionals that pass, only the first one will ever pass.  You can test this by creating two idential conditional groups and testing them both!

---
re: Do you know how to check this with Airtable, regular contact to their support?

I'm afraid not, sorry!  I've seen people float the email support@airtable.com around, but I've never used it myself


I think it's just to do with the order of the conditionals!  If we provide two conditionals that pass, only the first one will ever pass.  You can test this by creating two idential conditional groups and testing them both!

---
re: Do you know how to check this with Airtable, regular contact to their support?

I'm afraid not, sorry!  I've seen people float the email support@airtable.com around, but I've never used it myself


@TheTimeSavingCo 

I can get the conditionals to work in either order, apparently as long as the first run is made with "contains" first. I cannot get "contains" to work on lookups. 

I sent an invite to a test base where these are visible.

Thankful for any advice!

Björn


Reply