Change data in select rows when one is changed

For a little homemade CRM, I have one table listing in- and outbound emails. The table contains, among other things, the GMail message ID (key) and the thread ID.

I am manually sorting these mails to the respective projects by changing the project ID field.

Now, if I change this information (project ID) for ONE mail, I want my Bot to do the same for all other mails in the same thread. I'm assuming that will be done by running an action on a set of rows, BUT I can not figure out how to set up this action.

Bot trigger: Data change

Condition: [_THISROW_BEFORE].[ProjectID]<>[_THISROW_AFTER].[ProjectID]

Process: Run a data action

Referenced rows: select(Mails[Key];[ThreadID]=[_THISROW].[ThreadID])

Referenced action: ???

 

Any hints that might remove the blockage in my head would be appreciated, thanks!

Solved Solved
0 4 108
1 ACCEPTED SOLUTION

I never did it for update. But you must create an action that do this update. The problem is i think you can't pass parameter to your action. if it's effectively impossible, just create a table to store temporarily your new project id, that you will use in your update action

View solution in original post

4 REPLIES 4

I never did it for update. But you must create an action that do this update. The problem is i think you can't pass parameter to your action. if it's effectively impossible, just create a table to store temporarily your new project id, that you will use in your update action

Thank you, that did the trick!

The bot now creates a new row in table "temp email data" with the relevant information, the actions use that information (with any(), since there is only ever one row) and then the bot deletes that row again.

Make an "Update Thread Project"  action that sets the Project value using an [_input] variable.

When you designate the action in the bot configuration, it will give you the option of assigning the variable, so you can set it to [_THISROW_AFTER].[ProjectID] .

 

Unfortunately, the "Run action on rows" does not have the option to assign input variables (only "Set row values" does, but since I want to change values in rows OTHER than the one i'm editing, I need to "Run action on rows").

Unless I'm overlooking something? My hopeful test resulted in "[_input] variable" as text in my threadID column, so at least I know my trigger/conditions work 🙂

Top Labels in this Space