Current User entity in formulas

I am wondering if it is possible to add the current logged in user as a constant/function that can be accessed in formulas. My use case is automatically adding the user as an attendee to a meeting. I imagine it will have other uses as well.

I suspect it’s not possible - what would/should a formula show if two users were viewing the entity at the same time?

Of course, it is possible to refer to the current user in action buttons and automation rules, but that’s another story.

That is exactly what I was thinking: use it in action button or automation. Totally agree that it would be useless in a formula field. I was thinking something along the line of the special “[Step 1]” object that is only available for actions and automations.

I think it will also probably have some usefulness in the future for using permissions as part of actions/automations. I think that would require implementation of some flow control/conditionals in action editor but probably will be useful.

Based on my understanding of what you want to achieve, it’s already possible with a script as part of a button/automation.
I believe flow control logic in buttons/automation may be on the radar for future improvements.

1 Like

Agreed, I just think formulas are easier to understand and therefore easier to maintain long term. Fully agree that this is down the list of priorities :slight_smile:

It is actually also possible using only formulas, but in an very crazy/roundabout way :slight_smile:

You make use of the ‘Assign to me’ function available in buttons/automations to find out who is the current user, and then switch the contents of the Assignees and Attendees fields.

It’s hard to explain, but here is it visually:

(Note: it uses a ‘helper’ field called Current assignees for temporary storage).