Upcoming database upgrades. Airtable functionality will be reduced for ~15 minutes at 06:00 UTC on Feb. 4 / 10:00 pm PT on Feb. 3. Learn more here

Setting current user to a field

Topic Labels: Automations
727 2
Showing results for 
Search instead for 
Did you mean: 

I’m trying to set a Collaborator field to the current user when they change the status of a row.

It seems automations do not know who the current user is… :thinking: :confused:

So I read about a workaround where you use the session object in a scripting step to set the current user to a variable and pull that out a step later.

output.set(‘current_username’, ${});

Thing is… I keep getting

ReferenceError: session is not defined

So… obviously I’m missing something, chasing a solution that is not possible, or just don’t understand how scripts work.

Any help?

2 Replies 2

You cannot get the current user directly in an automation script. You can only the the current user from the session object if you are in Scripting app.

You could use a last modified by field to tell you the user, and then get the user from that field.

Thank you.

The Last Modified By is what I ended up doing after I looked around some more.