New formulas for automations {{date()}} and {{current_user()}}

New formulas for automations :robot:: now you can use {{date()}} to get the current date and {{current_user()}} to get the user who triggered the automation.

  • date() can get the current datetime, but also modify it or get relative dates.

  • current_user() allows you to get information about the user who triggered the automation.


I’m having some trouble with the current_user() formula, which I suspect to be a bug.
Let me explain:
I have a “Budget” table for budgets and an “Approved Budgets” table for approved budgets. An automation creates a record on the “Approved Budgets” table whenever a record on the “Budget” table changes its state to “Approved”. One of the fields of the “Approved Budget” table is “Approved By”, which is set to current_user() by the automation mentioned above. This is an important field as it keeps track of who approved each budged.
When the state is changed to “Approved” manually, it works fine.
The “Budget” table also has a button field (“Approve Budget”) that when pressed the state of the record is changed to “Approved”. As before, when the budged is approved by pressing the button, the automation creates a record on the “Approved Budgets” table. Now I have a problem. When the budget is approved by pressing this button and not by having its state changed manually, the current_user() formula does not work and the "Approved By field is left blank!
It is as if when the automation is triggered by another automation, the current_user() formula gets confused. In my case, when the automation that creates a record on the “Approved Budgets” is triggered by the “Approve Budget” button and not by manually changing the state to “Approved”, it does not fill the “Approved By” field.
I have been trying to solve this problem in multiple ways with no success.
Any help? Is it really a bug? Any way around it?
Is there a different approach to keeping track of who approved each budget?
Thanks a lot!