Jump to content

Recommended Posts

Posted

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

Posted

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

Posted

Hi @Ricky

apologies, the script does write the array output to a single output variable, i just dont get to see it in the output value, hopefully the screenshots make sense

image.png.8d3d42173094ea553a0d926953dc37ef.png

image.png.2f1c3c43b04ae324bf387da4ac3e23af.png

thanks

Andy

Posted

@AndyGillyCan you confirm that the string you are attempting to store in a variable has the following format?

{{SISJobOutputParamenterStart:MoverADGroups}} ... <some text> ...  {{SISJobOutputParamenterEnd}}

Ricky

Posted

@Ricky

Write-Output "Mover Output:      $output"

"{{SISJobOutputParameterStart:MoverADGroups}}$output{{SISJobOutputParameterEnd}}"

is the bottom of the script

thanks

Andy

 

Posted

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

Posted

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

 

Posted

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}}

Posted

@AndyGilly, Looks all correct, so no issues with the output, however can you confirm that the variable MoverADGroups  the same as that configured for the operation  (Note that the parameter names are case sensitive).

Ricky

 

 

Posted

@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
Posted

@AndyGilly

This is proving to be a bit of a head-scratcher! Would you mind posting the complete output from the Console Output tab, rather than the Monitor tab, from the job?

Graham

Posted

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

Posted

@AndyGillyIn your PowerShell script you have a line that outputs your the content of the variable $output: 
 

Write-Output "Mover Output:      $output"

can you comment that line out and try  running it again.

Ricky

 

 

Posted

@AndyGillyDue to nature of this issue, I think the best approach will be to get an Incident raised and organise a remote session, with possibly a member of the dev team included so that we can get this resolved asap.

Ricky

 

  • Thanks 1
  • 2 weeks later...
Posted

A workaround is available, which can be implemented by turning off the parser within Hornbill Administration Settings:

image.png

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...