Help Desk

Submit a ticket My Tickets
Welcome
Login

Command Outputs

When building a Chain, it is important to be able to use the results from previous Commands in follow-on Commands. Using OneCloud terminology, Commands complete, the produce outputs. These outputs can be selected and used as an input to subsequent Commands in a Chain.

Command Outputs: How do they work?

  • Outputs from prior commands are available to all subsequent commands
  • For transformations, OneCloud Commands provide file outputs that are used in subsequent transformations.
  • Each command has a preview to see the results of the transformation.
  • Best practice: Avoid writing files to the file system and use outputs!

In the example below, the first Command "Create File" generates a file output. In the subsequent Command, the output of the prior Command is listed, and finally, in the third Command, a new column is inserted. Each step builds from the Output of the prior Command. 

Building with Outputs

One of the more compelling use cases when building with outputs is the ability to transform tabular data. Multiple transformations may need to be performed on a tabular data set. In this case, the previous Command's output will be the input for the current Command. 

If there is a Command that produces tabular data, add a Command after that command in order to be able to use its outputs. Simply click the variable icon for the field where you’d like to use the Command’s output and find it in the left-hand side variable menu. In order to provide a visual guide of which variable to select, outputs will all have an icon based on their data type. In the example below, the outputs for filter rows and add row numbers are being displayed in the variable selector. 

When Can I Use Command Outputs?

Outputs can only be used by Commands that are executed prior to the current Command. This includes parent Commands (in the case of separate Commands linked with a "success" condition) or prior Commands in a serial group. Moreover, a Command may not use outputs from other Commands in the same parallel group or the output from an iterator Command. OneCloud's Tabular Transformation Quick Start contains more detailed documentation and use-cases. Check it out and start using outputs to enhance the power of your Chains!

Output Types

Different OneCloud BizApps will produce different types of outputs. Currently, the following output types are available: 

TypeExample
TextSelected records from listing file output
IntegerNumber of records in a query
FileDownloaded response from a web service HTTP Request
FloatThe result of a floating-point calculation
DateSystem timestamp
JSONREST API web services response
ListList of files in a directory
MapList of pair/values

What's Next?

Learn how to use the Command Iterator.

B
Brian is the author of this solution article.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.