Thanks for the detailed description! Based on your issue — OrderDetails not appearing in the PDF until the Order is updated — this is a common issue in AppSheet and is usually caused by the timing of data syncs or how the Bot is triggered.
To help you fix this, I need to confirm:
Clarifying Questions:
- What is the trigger for your Bot?
Is it “For a record in Order”?
Or is it “For a record in OrderDetails”?
- What event triggers the Bot?
“Adds only”?
“Adds and updates”?
Something else?
- Are you using a Start expression in your template to list OrderDetails like this?
<<Start: [Related OrderDetails]>>
…
<>
Now here are the most likely causes and fixes:
Fixes Based on Common Scenarios:
If your Bot is triggered “For a record in Order” and the OrderDetails were just added:
The issue is that AppSheet hasn’t updated the reverse reference ([Related OrderDetails]) yet at the time the Bot runs.
Solution 1: Add a “Wait” step in the Bot process
This gives AppSheet time to commit related records.
In your Bot Process, add a Wait step before generating the PDF:
Step Type: Wait
Delay For: 00:00:05 (5 seconds)
This helps especially if the OrderDetails are being added just before the Bot is triggered.
Solution 2: Use a Data Change Action in a Grouped Action
If OrderDetails are being added just before the Bot runs, force a recalculation by updating the parent Order.
Create a new action on the Order table:
Name: Recalculate Order
Type: Data: set the values of some columns in this row
Target Table: Order
Just update a dummy column (e.g., LastUpdated = NOW())
Trigger this action after all OrderDetails are added.
This is why it shows the OrderDetails when you update the Order — the [Related OrderDetails] list gets updated after the change.
Solution 3: Trigger the Bot on the Last OrderDetail Added
If your process adds several OrderDetails, consider triggering the Bot after the last OrderDetail is added, not from the Order table.
Then use a “Parent Lookup” to pull data from Order and all its children.
Example Template Snippet for Reference
Make sure you’re using something like this in your template:
<<Start: [Related OrderDetails]>>
Item: <<[ItemName]>>
Qty: <<[Quantity]>>
<>
Next Step
Please let me know:
Your Bot trigger table and event.
Whether you’re generating the PDF immediately after adding OrderDetails.
If you’re using any automation to add OrderDetails or doing it manually.
With that info, I can give you a 100% tailored fix.