Aug 16, 2024 06:40 AM
Hi everyone. I am trying to set up an automation where when a diagnosis field for a trip in one table is updated it finds the corresponding person (that is connected) in another table and updates a diagnosis field in that table where only different diagnosis is entered. Attached is what I have started. It doesn't run. I tried adding a find records step but couldn't configure the condition (screen grab also attached).
Suggestions please!
Solved! Go to Solution.
Aug 20, 2024 07:13 AM
Hello Debbie,
As far as i understand your problem, you should no link table "Passengers" to table "Diagnosis directory".
As Adam said, you should define a rollup field in table passengers as such:
I copied your base and modified the Flight requests in order to have 3 different diagnosis on 3 different lines for Bobba Flett, here is the result in passengers tables:
If needed, you can also filter this "diagnoses" rollup field to show only diagnoses for which status is either "In progress" or "Booked" in "flight requests" table:
Regards,
Pascal
Aug 16, 2024 08:45 AM
Hi,
In Find Records you should move slider under condition to the right and choose (i suppose Dynamic)
then select field according to your needs
Aug 16, 2024 08:45 AM
Hello,
I am not sure that I completly understood your problem, but here is something that I tried:
This table "Trig Diagnosis" is linked to the table "Passengers" with the field "Patient".
I added a formula field "Passenger" that copies data for the linked field:
My table Passenger is the following:
Field "Test" is there to test the automation result.
Automation is set up as follows:
It is triggered when field "Diagnosis" is updated on table "Trip diagnosis"
I then have a "Find records" action to find related record in table "Passenger":
Two condition:
- Condition 1 using the formula field to match Passenger primary key field
- Condition 2 to retrieve the record only if Diagnosis is different
Next action is a repeating group set on the list of records obtained from the "find records" action to update the record in table passenger:
Where the record id comes from the current item of the list:
Regards,
Pascal
Aug 16, 2024 01:41 PM - edited Aug 16, 2024 01:45 PM
Pascal,
Thanks for your thoughtful reply. I was not able to figure out how to do all you suggested. I will take you through more detail about my tables and need and what I have attempted in automations and maybe you can help me figure out where I went wrong.
This shows the relevant fields in a large table. A flight request is populated from a form through Zapier. We are choosing a diagnosis from our diagnosis table and it is stored in the trip diagnosis. I created the Passenger field that you requested and then pulled in the Patient Diagnosis as a look up.
The Patient Diagnosis field is the field we are trying to update with the trip diagnosis if it isn't already there. We need to do this to be able to track what diagnosis a patient flew for as well as all the diagnosis a patient has.
That Patient diagnosis field is linked to the same directory as the trip diagnosis field.
It's not sending an error but I couldn't figure out how you got name and I didn't know how to do the repeating action.
Aug 17, 2024 12:53 AM - edited Aug 17, 2024 12:53 AM
It seems like you're trying to consolidate all the diagnoses from each of the trips a patient has been on, is that right? If so, would this work?
Link to base
---
Or is it that you're trying to track the diagnosis a patient went on a specific trip for, and then want to also track what they ended up diagnosed with during that trip?
Aug 18, 2024 02:31 AM
Hello Debbie,
Adam's answer may be the solution that you are looking for, dimiss this reply if it is the case.
Here is a screen capture for adding the "repeat" action:
Once added, you click on "Select input list":
And you select your "Find records" action and "use as a list" option:
Concerning the "name" option, it depends on field type. I guess that we did not set the same type for Diagnosis field.
Regards,
Pascal
Aug 19, 2024 07:28 AM
There is a complex table with many fields. One tab is set up for the scheduled trips another for the passenger data. The names are linked between. There is another tab with the diagnosis. We want to track 2 things: 1 what diagnosis did the patient seek treatment for on a specific flight but then we want to keep track of all the diagnosis of a patient. It is a little tricky because the patient can have many diagnosis but they don't travel to treatment for all of them at the same time. I hope that clarifies the issue.
Aug 19, 2024 01:22 PM
I am still not able to figure this out. Trying to do the suggestions. I did create a test data base so you can see more specifically what I have.
Aug 19, 2024 10:33 PM
Hmm, it sounds like a lookup field would work fine? The diagnosis the patient is seeking treatment for on a specific flight is kept in the "Flight Requests (Trips)" table, while the "Passengers" table would contain all the diagnoses they had for each trip they had?
Flight Requests (Trips):
Passengers:
Aug 20, 2024 06:17 AM
Thats right. I'm not sure how a look-up field would solve it. We want to add the trip diagnosis to whatever is in the patient diagnosis field—if it is different. That field is connected to the diagnosis directory which I fear is the issue.