Jump to content

ITOM Output Variables


Recommended Posts

Hi 

we creating a script that returns a list of AD groups a user is a member of.

The script writes the list of groups as an array & it writes the console fine

It will not write to the output variable in the ITOM UI. Is there a way i can check if this is just UI limitations or the variable is actually blank?

Are there limitations of the String output parameter type ??

 

thanks

Andy

Link to comment
Share on other sites

Hi @AndyGilly, it looks like you are attempting to store the output of an array into  a string, Hornbill variable types currently do not support the use of arrays.  In order to store the content of an array into a variable you would need to store each element into a separate variable or concatenate each element into a single string.

Regards,

Ricky

Link to comment
Share on other sites

Hi @AndyGilly,

The preferred method to do what you need is:

Write-Output "{{SISJobOutputParameterStart:MoverADGroups}}$($output){{SISJobOutputParameterEnd}}"

Note the use of a subexpression $($output), this will ensure your variable is printed as you would expect, in the event it's not of type string.

Cheers,

Steve

Link to comment
Share on other sites

Hi @AndyGilly, Looks like your output is in the correct format, however I am unable to verify that as I cannot view the entire string.  Could you post the entire string so that I can ensure that format is correct, and run a test in-house.

Thanks,

Ricky

 

Link to comment
Share on other sites

Hi @Ricky

here you go, 

thanks

Andy

{{SISJobOutputParameterStart:MoverADGroups}}OC-P2000 OC-HR-INDUCTION OC-C&R NA-PROCANDTRAIN NA-PEOPLE-SUNDAYTIMES NA-PEOPLE-MI NA-PEOPLE Debbie Wood - W2B (WCMS) Vacancy Edit (Rep) Trent Training (QlikView) MI People (O365) Teams Direct Routing (O365) Forms (Internet) Video Streaming (Internet) File Sharing (Azure) Docusign SSO (Applic) Sitedata_RO (Applic) PS2000 (Applic) HRRep Senior Managers (Applic) HRRep People Managers (Applic) GIS (Applic) Acrobat #DIST - ROC Daily Report #DIST - Management Reporting #DIST - Fin Docusign SSO-11004472407 #DEPT - People{{SISJobOutputParameterEnd}}

Link to comment
Share on other sites

@AndyGillyThanks for the confirmation.  I have tested this in-house and am unable to replicate the issue, and have now passed this to the dev team for investigation to identify the cause and implement a fix if required, and I will keep you updated with any progress.

Ricky

 

  • Thanks 1
Link to comment
Share on other sites

HI @Graham

this is the console output, nowhere near as much info as in the monitor

Note: This output has been filtered for readability.
The original PowerShell CLIXML output has been removed.

Get AD Groups for Mover script started
Setting variables...
Running Script
User = DZWOOD
Group are:
adding to querylist: OC-P2000
adding to querylist: OC-HR-INDUCTION
NND

 

thanks

Andy

Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...