I am creating a Form view, for users to clock in and out.
All the data will be stored in a Google sheet “Staff” sheet.
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",
"[email protected]",
"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"
}