Workflow Using Two Child Tables?


The app I’m designing has a master table (“Details”) and four child tables (“Contacts”, “Communications”, “Hearings”, and “Enforcements”). For every detail record, there could be multiple child records in each of these tables. The primary key for Details is called “ComplaintID” and appears in all of the child tables.

I’m trying to create a workflow that uses data from the Contacts and Communications tables to generate an email attachment and mail it to a static recipient. The workflow begins when the user adds a row to the Communications table. Essentially, the first two fields in the attachment template use data from Communications and then there’s a start expression that pulls data from Contacts to fill in a table in the middle of the attachment.
Here’s a visual:

When I attempt to test this in the Appsheet environment, I get errors that Appsheet cannot find the in the Contacts table.

So my question is this: How do I manage to get the data from two indirectly related tables into one email attachment?

Please let me know if you need more explanation or graphics.

Remove [ContactKey]. from the following:

See also Sending Email Only After Adding a Parent Record and All of Its Children here:

1 Like

Thank you, Steve! This worked very well! You rock! :vulcan_salute:

1 Like