Skip to main content

Working with Tables

Three kinds of table serve three different purposes, and NxAgent can create and manage all of them by request. The distinction matters, because workflows depend on the type once it exists.

These are chat-panel operations: you ask for a table rather than using an AI control inside the table screens themselves.

TableWhat it is for
Decision tableBusiness rules that decide an outcome
Lookup tableLooking a value up by a key, such as country code to country name
Data tableStoring data your workflows produce, such as processed orders

Decision tables

Decision tables hold rules that decide real business outcomes, so a version cannot change without review. Every version moves through defined states.

The approval lifecycle

StateWhat it means
DraftEditable, not yet submitted
Pending approvalSubmitted, waiting on approvers
PublishedApproved and live
RejectedTurned down, and cannot be resubmitted as-is

How versions move between states:

FromActionResult
DraftUpdateStays a draft
DraftSubmitGoes to pending approval
Pending approvalApprove, once all approvers agreePublished
Pending approvalRejectRejected
Pending approvalRetractBack to draft
RejectedRetractBack to draft
PublishedRoll backCopies that version into a new draft

Rolling back does not overwrite anything. It copies an older version's content into a fresh draft, which then goes through approval like any other change, so your history stays intact.

Ask for a decision table

List the decision tables.

Create a decision table for shipping charges based on weight and destination.

See Managing Data and Decision Tables for the full reference.

Lookup tables and data tables

Both are tables your workflows read from and write to. They are managed the same way but exist for different reasons.

Lookup tableData table
ForLooking a value up by a keyStoring data your workflows produce
Typical useCountry code to country nameRecording processed orders
StructureKey columns plus value columnsUsually all value columns
In StudioLookup TableData Table
From workflowsLook up, add, and remove entriesQuery, insert, update, delete, and clear

The simplest way to decide: if you are looking something up, it is a lookup table. If you are keeping a record of something, it is a data table.

You are always asked which type

If you do not say "lookup table" or "data table" in those words, NxAgent asks before creating anything, every time.

This is deliberate. Key columns exist in both types, so the column structure is not a reliable clue, and the two behave differently once workflows depend on them. Answering one question now is less disruptive than discovering the wrong choice later.

Use them

List the tables.

Create a lookup table called CountryCodes with code as the key.

Results are grouped into lookup tables and data tables, so you can see which is which.

How you know it worked

New tables appear as pending changes and exist only once you accept them. Decision tables additionally show their state, so you can see whether a version is a draft, awaiting approval, or published.

Next steps