You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sending a variable cast as a string with "array" objects separated by a comma adds them to the field separated by a line (i.e. unique entries) and no square brackets:
Works, sending the data without brackets. Unsure what you can do with this info, I can build my script around it, not sure if this matters to anyone else or if I'm just using the function incorrectly.
Cheers
_Fonz
The text was updated successfully, but these errors were encountered:
From my research, although SN says it wants json for the payload, that's not applicable to List based fields. Values for those fields are just comma separated and not arrays which add [ ] when converting to json. Converting to a string with [string]$CIs = 'Server1, Server2' has a value of Server1, Server2 which is what SN wants.
I'll give some thought to the best way to handle this and update you when I've come up with a solution.
Hey! So sorry for the long delay. I have finally been able to test this, however I'm not sure how as I have no updated module or code? It looks like this fix was blocked? Am I reading that wrong?
Environment
Steps to reproduce
Expected behavior
Field in ServiceNow should just be populated with
Server1
&Server2
Actual behavior
Field in ServiceNow is populated with
[Server1
&Server2]
Screenshots
Not sending an array and instead casting a single object as a string removes the brackets
Sending a variable cast as a string with "array" objects separated by a comma adds them to the field separated by a line (i.e. unique entries) and no square brackets:
So if the variable is an array:
Works, sending the data without brackets. Unsure what you can do with this info, I can build my script around it, not sure if this matters to anyone else or if I'm just using the function incorrectly.
Cheers
_Fonz
The text was updated successfully, but these errors were encountered: