How to write to a diffrent tables cell from trigger formula

Is there a way to add a row in a different table from python within a trigger formula?

I only see read access APIs, no write access to other cells / rows / tables.

3 Likes

There is no such functionality yet, although there have been some ideas and experiments for adding it. Could you share your use case, so that we can see if these ideas would address them?

Hi dmitry-grist,
of course.
Use case: project management, logging of changes to a “task” table to a “task updates” table.
I made a GIF to show what i talk about. Changes to the issue status should cause a trigger formula to add a row to “task updates” that shows who changed the status
Animation

This is just an example, beeing able to write to arbitrary tables from trigger formulas would allow any kind of user defined audit logging capability.

I already have experience with using your current python lib for accessing the REST API, see here.
From my perspective exposing that REST API to the python sandbox runtime and including the existing python api would be sufficient.

Kind regards,

Vinschni

+1 for this feature request. I’d like to change another cell in the same row (change Status field) if I add a value to other empty cell (tracking code).

@Mikhail_Emelchenkov If the intended change is within the same row as the changed cell, trigger formulas should do the trick.

@Vin_Schni Custom plugins may help getting to this kind of result. @TomNit’s AutoAction might be used for that. It’s also achievable with pug_py widget, as illustrated here (cf the collapsed Last change, clicking on Open configuration).

@jperon Do you mean, set “on record change” event for Status field?

If you check Apply on record changes, you may define which properties will trigger the formula.

grist

1 Like

@jperon Oh yes, this way it could work as I want.

And I’d like to change another cells in the same column.
Particularly I need to make sure only one CheckBox in column (data, not formula!) is ticked (with additional conditions, but it’s not important for the problem).
So when user clicks Checkbox in a row, the previous checked row should be unchecked.