INSTANT PDF GENRATE IN APPSHEET THROUGH THE BOT

I am generating a PDF through a Bot, which includes details from two tables:
Order and OrderDetails (this contains all the item details).

All the details from the Order table are coming in the PDF, but the OrderDetails are not appearing.
As soon as I go to the Order and update anything, the OrderDetails start showing up in the PDF.

How can I make the OrderDetails appear in the PDF without needing to update the Order every time?


Let me know if you’d like help fixing this issue in your Bot setup or PDF template logic in AppSheet.
Also, please mention what trigger or process you are using in the Bot — for example:
For a record in Order” or “For a record in OrderDetails”.

1 Like

@anshu966 maybe show an example for both. Update from Parent record and update from child record.

You have to have all the details saved before you run the bot to have them appear in the PDF. (there are a few posts related to this)

I would create an ORDER STATUS field in the ORDERS table, and once all the DETAILS are created, update the STATUS to ‘SUBMIT’ or something and trigger the bot on that Change.

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:

:pushpin: Clarifying Questions:

  1. What is the trigger for your Bot?

Is it “For a record in Order”?

Or is it “For a record in OrderDetails”?

  1. What event triggers the Bot?

“Adds only”?

“Adds and updates”?

Something else?

  1. 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:

:white_check_mark: Fixes Based on Common Scenarios:

:white_check_mark: 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.

:white_check_mark: 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.

:white_check_mark: 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.

:white_check_mark: 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.

:page_facing_up: Example Template Snippet for Reference

Make sure you’re using something like this in your template:

<<Start: [Related OrderDetails]>>

Item: <<[ItemName]>>

Qty: <<[Quantity]>>

<>

:white_check_mark: 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.