The CreatorCon Call for Content is officially open! Get started here.

send data from ecc_queue

Aya Hassan
Tera Contributor

i want to do schedule job to create ecc_queue to do command and at the same time send some data(array) to midservser i know how to send the command but don't know how to sed the array at the same time 

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

@Aya Hassan 

can you share screenshots and also the script you are using?

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

SwarnadeepNandy
Mega Sage

Hello @Aya Hassan,

 

There are a few possible ways to send data array to midserver in ServiceNow. One way is to use the MID Server Script File feature, which allows you to create and execute scripts on the midserver. You can use the writeFile method to write the data array to a file on the midserver, and then use th...

Another way is to use the MID Server Script Include feature, which allows you to create and execute script includes on the midserver. You can use the MIDServer.get() method to get a reference to the midserver, and then use the execute...

A third way is to use the JSON format, which allows you to serialize and deserialize data arrays. You can use the JSON.stringify method to convert the data array to a JSON string, and then use the ecc_queue table to insert a record with the JSON string as the payload. Then, on the midserver, you can use the JSON.parse method to convert the JSON string back to a data ...

 

Hope this helps.

 

Kind Regards,

Swarnadeep Nandy