Targeting two tables with one button via cross-doc

Hello,

I’m building an ERP-style system in Coda and I’ve hit a limitation with cross-doc buttons that I can’t quite reason my way around.

Current setup (main ERP doc)

I have a main Coda doc that we use internally to process customer orders. The key tables involved are:

Partners

Each row represents a customer account. This is where we store default addresses and contact details.

Orders

Each row is a single order. This table holds order-level information only (partner, status, addresses, contacts, references, etc.). It does not store what is being purchased.

Products

A list of products we sell.

Order Line Items

Each row represents a single product on an order (product, quantity, price).

Multiple rows can be linked to the same order.

Example:

– 1× Machine

– 1× Pack of materials

Each of these is a separate row linked to the same order.

Internal order flow (works fine)

Inside the main doc, I’ve prototyped a “new order” flow using temporary tables:

  • New Order – Orders (temporary)

  • New Order – Order Line Items (temporary)

Users fill these out via a template view. When they’re ready, they click a “Place order” button.

That button runs a single formula using RunActions() and FormulaMap() that:

  1. Adds one row to the Orders table, mapping partner, addresses, contacts, etc.

  2. Iterates over the temporary line items and adds multiple rows to Order Line Items, correctly linking them to the newly created order.

  3. Updates the temporary row with an “Order Placed” confirmation.

(Formula below for reference. It works exactly as intended inside the same doc.)

RunActions(
  Orders.AddRow(
    Orders.Partner, thisRow.Partner,
    Orders.Status, [New Order],
    Orders.[Order form - Order ID], thisRow.RowId(),
    Orders.[Manual Delivery Address], thisRow.[Alternative Shipping Address],
    Orders.[Attach Purchase Order], thisRow.PO,
    Orders.[Manual Contact First Name], thisRow.[Alternative shipping first name],
    Orders.[Manual Contact Email], thisRow.[Alternative shipping email],
    Orders.[Manual Contact Last Name], thisRow.[Alternative shipping last name],
    Orders.[Manual Contact Phone Number], thisRow.[Alternative shipping phone number],
    Orders.[Customer Reference], thisRow.[Your Reference Code (optional)],
    Orders.[Manual Billing Address], thisRow.[Alternative billing address],
    Orders.[Portal order], [Portal order tags].First()
  ),
  FormulaMap(
    thisRow.Products,
    [Order Line Items].AddRow(
      [Order Line Items].Order,
      Orders.Lookup(Orders.[Order form - Order ID], thisRow.[Row ID]),
      [Order Line Items].Product, CurrentValue.Product,
      [Order Line Items].Quantity, CurrentValue.Quantity,
      [Order Line Items].Price, CurrentValue.[Your Price]
    )
  ),
  thisRow.ModifyRows(thisRow.[Order confirmation], "Order Placed")
)

What I’m trying to do

I now want to create a separate, external, customer-facing doc where customers can place orders themselves.

The goal is for this satellite doc to submit data into the same Orders and Order Line Items tables in the main ERP doc.

The problem

From what I can tell, cross-doc buttons can only target a single table. That seems to prevent me from doing the same RunActions + FormulaMap pattern across multiple target tables (Orders and Order Line Items) in one click.

My questions

  1. Is it actually possible to use RunActions() and FormulaMap() in a cross-doc button to write to multiple tables in the target doc?

  2. If not, what is the recommended pattern for handling a parent-child insert like this (Order + multiple Line Items) from a separate doc?

  3. Are there known workarounds or architectural patterns for customer-facing order forms that feed into a central ERP doc?

Links to my docs.

If you want to help submit a share request and I will grant you access:
Main ERP doc
WIP satelite doc (Not much in here yet!)

Any guidance or examples would be hugely appreciated.