Dynamic Create Data
The Dynamic Create Data component creates a Data object or Message with configurable fields.
Define the table in the Input Configuration field, and the component creates corresponding input or output handles in the component.
Use the Dynamic Create Data component in a flow
The following example demonstrates how to use a Dynamic Create Data component to create a structured Data or Message object from multiple sources.
-
Add the Dynamic Create Data component to your flow.
-
To define your data's fields, in the Input Configuration field, click Open table.
-
To add rows to your table, click Add a new row. Adding a new row creates input and output handles for the Field Type. For example, if you add a
Texttype field, thenTextinput and output handles are added to the component. For each new row, configure the Field Name and Field Type.- Field Name: The name of the field used as both the internal key and display label.
- Field Type: The type of input field to create. The type options are:
- Text: Accepts direct text input or accepts
TextorMessageoutput from other components. - Data: Accepts
Datainput from other components. - Number: Accepts direct numeric input or accepts
TextorMessageoutputs from other components. - Handle: Accepts
Text,Data, orMessageoutput from other components. - Boolean: Accepts Boolean values. Cannot accept input from another component.
- Text: Accepts direct text input or accepts
For more information, see Langflow data types.
-
Depending on your Field Type selections, either connect output from other components to dynamically populate the inputs, or enter values manually in the Dynamic Create Data component's fields.
-
Select the desired output type at the component's output port. The component outputs either a
Dataobject containing all field values from the component's inputs, or aMessagecontaining all field values formatted as a text string.
Dynamic Create Data parameters
Some parameters are hidden by default in the visual editor. You can modify all parameters through the Controls in the component's header menu.
| Name | Display Name | Info |
|---|---|---|
form_fields | Input Configuration | Input parameter. A table that defines the dynamic form fields. |
include_metadata | Include Metadata | Input parameter. Whether to include form configuration metadata in the output. |
form_data | Data | Output parameter. A Data object containing all field values from the dynamic inputs. |
message | Message | Output parameter. A formatted Text message containing all field values in a human-readable format. |