Help

Re: Automation not getting the value in a lookup field

Solved
Jump to Solution
2579 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Fernando_Martin
6 - Interface Innovator
6 - Interface Innovator

I’m setting an automation to copy a value from a lookup field (formatted as currency) to a currency field.
The tests run fine, but the automation doesn’t get the value from this lookup field when it goes live. It works if I set a manual value in the automation, so it seems something wrong with getting the value, the field type or something like that. Has anyone hit the same issue or has something to add to help?

Screen Shot 2020-08-19 at 9.27.49 AM Screen Shot 2020-08-19 at 9.28.06 AMScreen Shot 2020-08-19 at 9.32.22 AM Screen Shot 2020-08-19 at 9.31.45 AM

1 Solution

Accepted Solutions

I’ve experienced this issue too, @Fernando_Martinewski.

I worked around it by creating a formula field that pulls in the value from the lookup field and concatenates it with an empty string, just to be sure it comes through as a string, like this:

{Lookup Field} & ''

Then I target that Formula field in my automation instead of the Lookup field. It seems to work much better.

It’s a little frustrating that we have to do this, and to have that extra field hanging around, but it’s easy enough to keep it hidden, so it’s mostly unobtrusive.

Not sure what the issue is, exactly, with the Lookup fields, but hopefully Airtable will see this and look into it.

See Solution in Thread

7 Replies 7

Is your trigger “New Record”? If so, you’ll probably need to switch to the “New Record in View” trigger instead, and create a new view that you can control when the new record enters that view.

No, it is a new record in view trigger, and that field is in the filters for this view too. That means that field can’t be empty when the record shows in that particular view.

I’ve experienced this issue too, @Fernando_Martinewski.

I worked around it by creating a formula field that pulls in the value from the lookup field and concatenates it with an empty string, just to be sure it comes through as a string, like this:

{Lookup Field} & ''

Then I target that Formula field in my automation instead of the Lookup field. It seems to work much better.

It’s a little frustrating that we have to do this, and to have that extra field hanging around, but it’s easy enough to keep it hidden, so it’s mostly unobtrusive.

Not sure what the issue is, exactly, with the Lookup fields, but hopefully Airtable will see this and look into it.

My gut says that it’s because lookups return arrays most of the time, not single values, even if they’re only pulling from one linked record. The extra formula field is one way to force it to a single value. Another would be to not pass the value in the input variables, and instead grab it from the script itself using getCellValueAsString, converting to a number after that.

Fernando_Martin
6 - Interface Innovator
6 - Interface Innovator

Thanks for your workaround, Jeremy. It works and I marked it as the solution.
I believe the issue is what Justin mentioned and his solution is usable too.

Yes, @Justin_Barrett’s suggestion is preferable if you are using a Scripting action. My suggestion works with the “Update a record” action, which is what I am using it with.

climesumer
6 - Interface Innovator
6 - Interface Innovator

Hi there, I have a similar problem but coulnt fix it.

I have a table called "activities" that links to a "users" table and a "products" table.
Each time a user upvotes a product, a new entry is created. (Picture 1)

I am trying to set up an automation that updates one field in the linked product, with the user who upvoted that product. (Picture 2)

It seems like the linked fields appear to be empty for Airtable. Only when I untoggle the fields the actual user or product appears. (Photo 3)

I keep getting an error message, for an automation that should really be simple. (Picture 4)

How can I fix this? Does Airtable not support Linked Fields? How can I get the linked field info to show up in the field values?

I spent 5 hours trying to fix this. Any help or pointer is greatly appreciated. Many thanks!
Picture 1.pngPicture 2.pngPicture 3.pngPicture 4.png