Automation not getting the value in a lookup field

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?

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.

1 Like

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.

1 Like

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.

1 Like

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.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.