Passing data using outputs
Often, you need to transfer or pass data between jigs to provide context and data, for example, when pressing on a customer in a list, the customer ID is passed to the order form, prepopulating the customer's details. This is accomplished by utilizing inputs and outputs.
Outputs

Outputs are configured in a jig and are then used as an input in a composite jig to pass data between the jigs in the composite jig. This configuration is suitable for creating master detail screens, clicking on a component in one jig, populates the components and data in the next screen. Passing data values between jigs works both ways.
Considerations
An
instanceIdis required for the jig that is exposing anoutputin order to access the output viastatefrom another jig.The data from configuring
outputscan only be used in composite jigs.Using the
outputproperty must be reciprocated with aninputproperty in the composite jig.The
outputrequires anoutput-keyand a data value that is available in that jig.The receiving jig configuration uses the format similar to
[email protected]. Use IntelliSense (ctrl+space) to assist with configuration.
YAML code
The output and input work in conjunction with each other.
Output: In the jig containing the data you want to transfer, configure the output-key. Example:
Input: In the receiving jig.composite configure the input for the data. Example:
Examples
Passing data via outputs to connect two jigs data in a composite jig
In this example, cleaning services are listed, initially the service details are blank showing a placeholder. Once the service is selected from the List of available services, the service details for that specific service populates.

Output Jig - available services
Create a horizontal jig.list to show the available services with a leftElement for the image and rightElement for the text values. Add the output: output-key property and use the jig state for the active item [email protected]
Jig - service details

Create a default jig with component.entity to display the various details such as service name, time, and cost. Define the datasource and configure a
Composite jig - combining output with input
Create a jig.composite and add the jigIds for both jigs above. Give the jig configured with the output an instanceId and the jig that receives the output an input property.
Last updated
Was this helpful?