Hi there,
I have a table in appsheet called REQUESTS with columns (Request ID, Name, Age, Funds).
Whenever a new request is added I need a separate REQUESTS LOG table created showing all previous and new requests.
My question is, how can I get the REQUESTS LOG table to add a new row whenever any changes are made to an existing row in REQUESTS table, i.e when the Funds column is edited from say $10 to $20?
I would essentially want the initial request still to appear in the REQUEST LOG table but with another row with the same Request ID and columns except with a different Funds value ($20).
I have created an Automation Event for REQUESTS table for Updates and a Process to add New Rows to the REQUESTS LOG table. However this only changes the Funds value in the same row from $10 to $20, there is no record that it was $10.
Thanking you in advance.
In general, you may want to reevaluate the necessity of a log table because for each change in a master record if it creates a log record, then it could grow very fast in size. So, if any record in the "Requests" table changes on an average 5 times, the log table will be 5 times the size of the "Requests" table.
Anyway, you can create a log table record by creating an event action type "Data: add a new row to another table by using values from this row "
Actions: The Essentials - AppSheet Help (google.com)
You could trigger this action as an event action on form save event in the "Requests" table or a data change event bot that runs on Add/Update changes in the "Requests" table.
Hi Suvrutt,
For some reason the event is not triggered. Should I add an optional Condition Expression to the EVENT?
Generally, if there is no condition in the event and if Adds/Updates are enabled for 'Data Change Type" setting, then the bot should run on any event of row add or edit.
You may want to recheck why it is not running on add/update events.
I have ticked both 'Adds' and Updates'
You may want share entire bot configuration screenshots then. Have you added the action to the bot step.
Hi Suvrutt,
I have got the change log to sort of work.
All changes made by a user are captured perfectly fine. However when an approver accepts a request (STATUS changes from routed to PM to routed to CTO) an event to route the request to CTO is not added to the change log.
I suspect this is because it is a system generated change.
How can I capture all changes USER and SYSTEM changes?
Hi @PG3 ,
@PG3 wrote:
However when an approver accepts a request (STATUS changes from routed to PM to routed to CTO) an event to route the request to CTO is not added to the change log.
You may want to elaborate this statement. For example, what you mean by "an approver accepts a request "? What exactly happens in the app?
I have used the 'Travel Approval Workflow' app template and created a milestone request app.
In the app there is an action created to 'Approve and route to XX'. Once the Project Manager in this case clicks on the 'APPROVE AND ROUTE TO CTO' action button the status in the Request table changes from 'ROUTED TO PM' to ''ROUTED TO CTO'. This change in the STATUS in the Request table is not captured in the log table. I guess it is because it is system generated.
Okay, thank you. Could you update how you are currently triggering the action "Data: add a new row to another table by using values from this row " that adds a new row the log table?
Edit: if you are running it as a form save event action, please try it as a bot initiated action- an action run when bot runs on add/edit /delete of the record in the "Requests" table.
I created a bot to add rows on 'Adds', 'Deetes' and 'Updates'
User | Count |
---|---|
16 | |
13 | |
8 | |
7 | |
4 |