Help with workflow referring different tables

Hi there, I’m following the steps listed here: https://help.appsheet.com/en/articles/1363923-changing-data-from-a-workflow-rule-or-scheduled-report trying to create a rule to change values.

My app has an entity called Patients, and each patient has a list of admissions (composed of entry, release date). The admissions is listed as a details from the patient detail view.

Patient also has a flag to facilitate grouping on the list (an enum with values admitted and discharged).

Idea is that when an entry of admission is set and the admission date is not empty, I set the value on the patient record to the admitted enum.

I have two actions on the Patients table:

  • one to set the enum value (set the values of some columns in this row)
  • One to grab the Patient key from a list and then invoke the action to set the enum value

I then create the workflow on the Admissions table, and I get an error: ERROR WORKFLOW ACTION NAME NOT FOUND

Ok, I kinda get it, the action was on the Patient table, and the workflow is tied to the Admissions table. But isn’t it possible to create such workflow?

Any ideas?

Solved Solved
0 10 328
1 ACCEPTED SOLUTION

In this screenshot, LIST(Interno). needs to be LIST([Interno]) - square brackets around the column name.

View solution in original post

10 REPLIES 10

If I understand correctly, you are operating at the Admissions table level - inserting an Admissions record and then using a workflow to update the Patient record.

First I would recommend flipping this. Look up the Patient record first and then adding the Admission record to that Patient. As you said each Patient has a list of Admissions. The admissions should be attached as child records to the Patient row using AppSheet’s Parent/Child feature “Is Part Of” switch that creates this link for you. Then you can automatically update the Patient status based on the entered admission record. No workflow will be needed and the app is more efficient.

You can still have an Admissions table for viewing all patient admissions.


If my understanding of your request is correct and you still wish proceed with the current design, you will need to create what I refer to as a “bridge” action. You need to bridge between the entered Admission row and the desired Patient record so you can update the Patient. To do this:

1). Create an action for Admissions called from the workflow and defined as “execute an action on a set of rows”.
2). Se the Referenced Table to Patients
3). Set the Referenced Rows = to LIST([Patient]). Note: this assumes that the Patient column on your Admission table is defined as a Ref type column.
4) Set the the Reference Action to that action you have create to update the Patient row.

I hope this helps. Please ask if you have questions.

John, I’ve tried the solution, and it indeed allowed me to create the workflow, but I’m not seeing it working.
The tables have a different name (they are in Portuguese) but Interno = Patient, and Internacoes = Admissions.

Here’s the data structure: (pictures on each reply due restrictions of the forum, apologies)

But on adding a new record to the Internacoes, the status on the Interno table does not change.

Is there a way to debug what could be happening?

Thank you

In this screenshot, LIST(Interno). needs to be LIST([Interno]) - square brackets around the column name.

The square brackets did it, thanks. Didn’t realize the brackets were used to refer to a column as opposed to the literal value.

Thank you

Hi John thanks for the answer, but I really can’t find that option. So, I’ve modeled to be just like you said, when editing patient I have the child records in an item-detail association, but I’m using a list and REF_ROWS(“Admission”, “Patient_key”) to list.

How do I modify the design to use the Is Part of for multiple values? I could see it for a single value, but a patient can have multiple admissions, could not see how to make it a 1-n relationship. What am I doing wrong here?

Thank you

In this action that is updating the status, the value needs to be one you added in the Enum value list for the column [Status]. Something like "Admitted".

Top Labels in this Space