Firstly, @appsheet. Thank you for supporting those of us who are building covid-related applications.
I’ve read through so many different responses on how to update a table if another table is changed but I can’t seem to find a solution that works 100% of the time.
My question is pretty simple I think:
We have 2 main tables - visits and cases.
Basically, when we log a visit as “Suspected” or “Active”, we want the case status to be “Open”. Otherwise we want the case status to be “Closed”. (We typically follow up for 14 days to make sure these people are ok)
I’ve tried both of these methods:
However, when I look at my data, both of these implementations of this action only updates 80% of case statuses. There are 20% of the case statuses that do not update. Therefore, I can’t tell if this is a bug or if I am not using best practices to accomplish this task. Is there a more reliable way to do this?
Thanks in advance for your help.
Both of these methods are acceptable ways to perform your desired update. Personally, I would recommend method 1 because the user making the changes will see the update immediately.
I have never had an issue with this option not updating consistently unless it was something I implemented incorrectly. I suspect that there is something off about your implementation as well.
Can you show us your “Execute an action on a set of rows” action as well as the action it calls? WE can help form these sort out the problem.
Thank you for the response. This is what I did:
On the case table, I have a behavior that executes a sequences of 2 actions.
First action opens a “Visit Form” UX:
LINKTOFORM("visit_form - Adding from case", "case_id_ref", [Case_ID], "patient_id", [patient_id_ref])
In the “behavior” I have the “event action” opens a behavior titled “Update Case After Visit Submission”
“Update Case After Visit Submission” does the following:
SELECT(cases[case_id],[case_id]=visit[_ThisRow].[case_id_ref])
The 2nd action is on the “cases” table with "set the values on some columns in this row: "
For status column: IF(OR(([latest_visit_status]="Recovered"),([latest_visit_status]="Death")),"Closed","Open")
Maybe the issue is that I have a reference action as well as a second action? Seems repetitive.
It’s just very strange that it only works like 80% of the time.
User | Count |
---|---|
43 | |
29 | |
24 | |
22 | |
13 |