pushToArray
  • 18 Oct 2024
  • Dark
    Light
  • PDF

pushToArray

  • Dark
    Light
  • PDF

Article summary

push To Array task Purpose

The push To Array task adds an item to the end of a job array variable.

Properties

Property Description
Select Job Variable (required) Select the job variable from the dropdown list that will receive a new item at the end of its array value.
Item Location (required) Specify where to find the item to add. The item location may come from a "job" variable, a "static" value, or an earlier task's outgoing variable.
Item (required) If Item location is "static", the Value field becomes a text edit box; type the new value. If Item location is "job" or an earlier task, the Value field becomes a dropdown list; select one of the listed variables.

Example

Assume a job variable named fruits with value ["apple","banana","orange"] and you want to add pear as a fourth element in the array.

  1. In the push task properties dialog box, select fruits from the Select Job Variables dropdown.
  2. Select Item Location static.
  3. Type pear in the Item text box.
  4. Click UPDATE.

The push task changes job variable fruits to have value ["apple","banana","orange", "pear"].

Figure: Push To Array Task
Push To Array


Was this article helpful?

What's Next
Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.