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:
-
Go to Developer toolbox (available only when in Edit mode)
-
Click on Database
-
Hover over OfferItem
-
Click on +
-
Select Field Type: Lookup
-
Type in the Display Name textbox: Offer ID
-
From the Table Name dropdown menu select: Offers
-
From the Display Key dropdown menu select: ID
-
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:
-
Go to Developer toolbox (available only when in Edit mode)
-
Click on Database
-
Hover over Offers
-
Click on +
-
From the Field Type dropdown menu select: Lookup Array
-
Type in your preffered name in the Display Name textbox: Products
-
Select from the Table Name dropdown menu: OfferItem
-
Select from the Lookup Values dropdown menu: Offer ID
-
In the selection box Include Fields select: Total, Price, Quantity, Name
-
Scroll down to Table Order and type in: -1
-
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).