Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

Pattern Designer -> How to process a multi value field and write that into a CMDB field as a String?

NagyDan1
Giga Guru

This a "Pattern Designer" question.

 

This JSON is pulled via API into the Pattern, I'm just showing here one record:

 

{
"name": "aaa-cr-network-it.hub-bbbb-001-vnt",
"id": "/subscriptions/111111111-e23d-4322-8b22-056c83022222/resourceGroups/aaa-pr-network-ithub-bbbb-001-rgp/providers/Microsoft.Network/virtualNetworks/aaaa-pr-network-it.hub-bbbb-001-vnt",
"properties": {
"provisioningState": "Succeeded",
"dhcpOptions": {
"dnsServers": ["10.33.24.11", "10.11.24.12", "10.22.24.13"]
}
}
}

 

 

 

I need to put that "dnsServers" value into a string field in CMDB: "cmdb_ci_network . u_azure_dns_server"

 

ISSUE: see attached screenshot, the "dnsServers" is recognised by the Pattern "Highlighter tool" as separate values.

 

I need an EVAL() script or other solution to merge them into a Comma Separated String, so I can Write that into the CMDB field!

 

 

Any idea? 😀 No AI slop, or no "rank-pumping" nonsense answer please.

Just real ideas, if I may ask.

 

 

 

.

0 REPLIES 0