Related Records Not Showing in Workflow/Bot Document

I hope someone can help!

I have a table, 'Sales', that contains a "Sales ID" as the key column. I have another table, 'SalesItems', that contains "SalesItems ID" as the key column. There is also a "Sales ID" column that is set to 'Ref' with the source table being 'Sales' and the "Is a part of" checked (because I need to be able to add items to the sale from the 'Sales' form.

20220717_01_SalesIssue.png

 

 

 

20220717_02_SalesIssue.png

 

 

 

 

 

 

 

 

 

 

 

 

When a new sale record is created I want to generate a PDF invoice using the data from 'Sales' and 'SalesItems'. I can't get the child 'SalesItems' to populate into the document and I can't figure out why. I've tried with my own custom template and with the default template without success. I've tried referencing both the system-generated "Related SalesItems" column and using a SELECT function to get the data from 'SalesItems' but it hasn't worked. However, the failure only occurs when the 'Sales' record is first created. If the automation fires on an update the sales invoice populates fully (that is to say with the child records that already existing prior to the update). I have also been able to get it to populate using a 5 minute 'Wait' step in the bot but that's simply too long to have to wait.20220717_03_SalesIssue.png

 

 

 

 

 

 

 

 

 

Does anyone know where I might be going wrong or how I might solve this?

Solved Solved
0 4 179
1 ACCEPTED SOLUTION

Please check the section "Send an email only after adding a parent record ad all of its children" in the article below.

Example automations - AppSheet Help

 

 

View solution in original post

4 REPLIES 4

Apologies for the large white-spaces in the post, I don't know why that happened.

Please check the section "Send an email only after adding a parent record ad all of its children" in the article below.

Example automations - AppSheet Help

 

 

Thanks for pointing me in the right direction!

It's a very inelegant solution but it seems to be working so far.

Yes, it is definitely so but yes it does work.๐Ÿ™‚

Top Labels in this Space