I am facing a challenge. When user time-out with the form, the bot that I set up doesn't update the value to the existing time-in row. Instead, it has become a new row.
---Current (Wrong)---
---Expect---
I have set up 2 action and 1 bot to write to existing row if there is a data change in "Staff" table. But it fail and below is the table, action and bot setting. May I know where went wrong?
This is my Staff Table setting:
This is my Check Out Action:
Referenced Rows:
SELECT( STAFF[_ROWNUMBER], AND( [Name] = USEREMAIL(), [Date] = TODAY(), [Branch] = [_THISROW].[Branch], ISBLANK([Time Out]) ) )
This is my Set Check out time Action:
Bot Setting
Event Condition:
Not(ISBLANK( ANY( SELECT( Staff[Time In], AND( [Date] = TODAY(), [Branch] = [_THISROW].[Branch], [Name] = USEREMAIL() ) ) ) ))
This is the error message from the bot "Test" result:
Failed: Error: 'Execute an Action on a Set of Rows' Data action 'Check Out' for table 'Staff failed with exception Cannot get key values when Parent or ChangeImage are null. { "$type": "Nirvana.Data.TaskResultTakeAction, V2API", "AppWorkflowRuleOrProcessName": "Process for Auto Check-In/Check-Out - 2", "ActionName": "Check Out", "Changes": { "$id": "1", "$type": "ChangeOperations.Changes, ChangeOperations", "ListChanges": [ { "$id": "2", "$type": "ChangeOperations.Change, ChangeOperations", "AfterImage": [ "6", "eexxx@gmail.com", "05/18/2024", "TBP", "", "13:16:00", "336:00:00", "10", "", "", "" ], "AfterImageOriginal": null, "BeforeImage": null, "BeforeImageOriginal": null, "ChangeImage": null, "ChangeImageToLog": [], "ChangeImageSavedImages": null, "ProcessStateDataChange": null, "MustReadBeforeOrAfterImage": false, "OpTypePerformed": "Update", "TableName": null } ] }, "AppErrors": { "$type": "Jeenee.DataTypes.AppErrors, Jeenee.DataTypes", "RecordInfo": false, "RecordWarning": true, "AnnotateErrors": false, "Errors": [] }, "TaskType": "TakeAction", "TaskName": "Check Out" }
Solved! Go to Solution.
Found the solution. I have change the Data Change Type to "Add" and condition to something simpler ISBLANK([_THISROW].[Time In])
Found the solution. I have change the Data Change Type to "Add" and condition to something simpler ISBLANK([_THISROW].[Time In])
User | Count |
---|---|
18 | |
14 | |
11 | |
7 | |
4 |