Autorun AI Docs

Linking Entities with Lookup Array

A Lookup Array creates a one-to-many relationship.
You use it when one record needs to connect to multiple related records - for example, one Offer with several OfferItem entries.


Super Fast Build: Prompt for Mileva

Create a Lookup Array field named "OfferItems" on the Offer entity that displays all related products in a table without manual filtering.


Step 1: OfferItem → Offer (Lookup)

Steps:

  1. Go to Developer toolbox (available only when in Edit mode)

  2. Click on Database

  3. Hover over OfferItem

  4. Click on +

  5. Select Field Type: Lookup

  6. Type in the Display Name textbox: Offer ID

  7. From the Table Name dropdown menu select: Offers

  8. From the Display Key dropdown menu select: ID

  9. Click Save


What this does:

  • You're adding a field inside OfferItem that links every item to a specific record in Offers.
  • By choosing Table Name: Offers, you tell Autorun which entity you want to reference.
  • Lookup Values: ID means the user will select from the list of Offer IDs when creating an OfferItem.
  • Without this lookup, Autorun wouldn’t know which Offer each individual OfferItem belongs to.

Why it's needed:

  • Lookup is the backbone of parent → child structures.
  • Every OfferItem must have its parent - the Offer.
  • This enables filtering, grouping, connecting data, displaying OfferItems on the Offer page, and so on.

Step 2: Offers → OfferItem (Lookup Array)

Steps:

  1. Go to Developer toolbox (available only when in Edit mode)

  2. Click on Database

  3. Hover over Offers

  4. Click on +

  5. From the Field Type dropdown menu select: Lookup Array

  6. Type in your preffered name in the Display Name textbox: Products

  7. Select from the Table Name dropdown menu: OfferItem

  8. Select from the Lookup Values dropdown menu: Offer ID

  9. In the selection box Include Fields select: Total, Price, Quantity, Name

  10. Scroll down to Table Order and type in: -1

  11. Scroll down to Col Span and type in: 2


What this does:

  • You’re adding a field inside Offers that automatically collects all related OfferItem records.
  • Table Name: OfferItem means “fetch all OfferItem records that are connected to this Offer.”
  • Lookup Values: Offer ID tells Autorun which lookup field in OfferItem is used for the connection.
  • Include Fields defines which columns will be shown in the embedded table.
  • Table Order and Col Span are just visual settings for how the table appears in forms.

Why it's needed:

  • Lookup Array allows you to instantly see all products (OfferItems) inside an Offer without manual filtering.
  • This is the standard way to build a parent → child overview.
  • One Offer may have dozens of OfferItem records - the Lookup Array handles this automatically.
  • Later on, it enables inline editing, totals, summary values, and more.

In short

  • Lookup Array = one record collects multiple related records (Offer → OfferItems).