I have 2 tables a Job table and a Log table. When an employee checks into a Job initially a row is added to the Log table. Multiple employees can check into the same job. When an employee checks out (from the Job table) I need the related Log table row to be updated to “Checked Out”.
I have a column on the Log table that references the Job table which created a “Related Log” list.
I have a “Check Out” action button for the Job table that changes the Job table status and an action on the Job table to execute and action on a set of rows but can’t, after many hours of trying, figure out how to change the status on the related Log table. I don’t know if I’m using an incorrect reference the the action or if its a workflow issue. I read the support articles on workflows and references and still can’t make it work.
This will be a two-part process, since it sounds like the user is interacting with the Job row rather that with the Log row directly. The action attached to the Job row will need to identify the appropriate Log row, then prompt that Log row to update itself with the new status.
Good question! How would you know which of the Log rows correspond to the current user? And of those rows, how would you know which one should be updated with the check-out?
You need to provide a way to determine which Log entry should receive the check-out status change. Is there anything about the correct Log entry that sets it apart from all others?
Only the LogKey would be unique to each Log row.
But how can this be uniquely referenced in a formula if it is not a column value in the Job table.
I’m also not sure how to use the Related Log List VC that AppSheet created. I assume it is a list of log entries related to the each record in the Job table but I don’t know what data if contains.
It sounds like what I need to do is possible according to your 1st response but I just am not getting it. I’m feeling like I should just scrap this and take another approach?
Enter the formulas in the referenced rows field of an action named “Update Log Status to Checked Out” on the Job table “Data: execute an action on a set of rows” and it returns this error:
“The expression is valid but its result type ‘Ref’ is not one of the expected types: List”