Home Orchestrator
Options

How to pass data used in a variable from 1 Item to another

VikVik Member IT Monkey ✭

Hi guys,

I have a "Run .Net Scripts" that runs PowerShell script. This gets some data into a variable that I'd like to call later in the process by another "Run .Net Scripts" PowerShell.

Do you guys know how to fetch data from a variable used in a previous step on the same RunBook?

Example: 1 has a variable named $AB, that I want 2 to use. Sorry, not allowed to post attachments here it seems.


Many thanks in advance

Best Answer

  • Options
    Matt_Howard1Matt_Howard1 Customer Adept IT Monkey ✭✭
    Answer ✓

    You'll need to add it to the 'Published Data' section of the Run .NET Script object.

    Name = Runbook variable ( that you can subscribe to in another action in the runbook )

    Type = Limited to String, Date/Time, Integer (honestly, I usually am just passing strings)

    Variable = Name of the variable in the script (without the '$' character)

    Then in the follow on activity, in the Details, you subscribe to the published data from that previous activity, provided they are linked.


Answers

  • Options
    Matt_Howard1Matt_Howard1 Customer Adept IT Monkey ✭✭
    Answer ✓

    You'll need to add it to the 'Published Data' section of the Run .NET Script object.

    Name = Runbook variable ( that you can subscribe to in another action in the runbook )

    Type = Limited to String, Date/Time, Integer (honestly, I usually am just passing strings)

    Variable = Name of the variable in the script (without the '$' character)

    Then in the follow on activity, in the Details, you subscribe to the published data from that previous activity, provided they are linked.


  • Options
    VikVik Member IT Monkey ✭

    Worked great, thanks @Matt_Howard1

Sign In or Register to comment.