Create Element
Use the Create Element step to initialise a named single-slot element — a holder for exactly one value or record reference. It is the single-value counterpart to a collection: where a collection holds many items, an element holds one. Update the element later with one or more Set Element steps.
Typical use cases include:
- Resolving a mapping once and reusing the result throughout the flow.
- Tracking an intermediate value or status that later steps read and overwrite.
- Holding a single record reference (e.g. the current document) that several steps act on.
Configure the step
Open the flow editor, add Create Element, and fill in the configuration card.
Description
- Purpose: Explain what the element represents in this flow.
- When to fill it: Always. The description is shown in the editor and execution history.
- Tips: Include the business intent, for example,
Track the resolved dispatch channel.
Element Name
- Purpose: The unique identifier for the element within the flow. Other steps reference it as
{{<name>}}, for example{{dispatchChannel}}. - When to fill it: Required. Use a concise, descriptive name such as
dispatchChannelorcurrentDocument. - Rules: Start with a letter and use only letters, digits and hyphens – no spaces or underscores, at most 30 characters. The name must not be used by any other output in the flow. While the name breaks one of these rules, the configuration card shows the reason and cannot be saved.
- Renaming: When you change the name later, every reference to it in the flow is updated automatically.
Element Type
- Purpose: Determines what kind of value the element holds.
- When to fill it: Required.
- Options:
- Value — the element stores a text value.
- Reference — the element stores a record reference (a pointer to a Business Central table record).
Table
- Purpose: Specifies which Business Central table the reference points to.
- When to fill it: Required when Element Type is Reference. Hidden otherwise.
- Tips: Use the lookup to select the target table (e.g. Customer, Sales Header).
Initial Value
- Purpose: The value the element starts with when the step runs.
- When to fill it: Optional.
- Value element — any text, may contain
{{name}}placeholders (e.g.pending). Leave empty to start with an empty value. - Reference element — a single
{{name}}placeholder pointing to a Reference SmartField that resolves to the same table as the element. Leave empty to set the reference later with a Set Element step.
- Value element — any text, may contain
- Tips: Use the assist-edit (...) or
Alt+Sto open the SmartField picker.
Outputs
The step registers one output that downstream steps can reference:
- <Element Name> – referenced by the name alone, for example
{{dispatchChannel}}or{{currentDocument.No}}. Typed as value or reference depending on the configured Element Type. For reference elements the output also carries the target table number.
In older flows the output still carries the step's slug, for example {{CreateDispatchChanne_dispatchChannel}}. Open the step and save it once: AutoFlow renames the output to {{dispatchChannel}} and updates every step that uses it.
When the flow runs, a Value element is always initialised — with the configured initial value, or an empty value when none is set — so downstream references always resolve. A Reference element is only written when an initial reference is configured; otherwise the slot stays empty until a Set Element step fills it, because there is no meaningful "empty" record reference.
Best practices
- Name elements clearly: Other steps reference the element by name, so a descriptive name avoids confusion in complex flows.
- Create before you set: A Set Element step targets the output of a Create Element step. Create the element first so the slot exists and downstream steps can reference it.
- Keep the type consistent: Choose Value or Reference up front. An element cannot switch between holding a value and holding a reference.