Aug 19, 2020 05:28 AM
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?
Solved! Go to Solution.
Aug 19, 2020 08:50 AM
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.
Aug 19, 2020 06:56 AM
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.
Aug 19, 2020 07:08 AM
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.
Aug 19, 2020 08:50 AM
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.
Aug 19, 2020 09:20 AM
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.
Aug 19, 2020 10:13 AM
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.
Aug 19, 2020 10:21 AM
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.
Mar 23, 2023 11:53 AM
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!