add multiple fields in system properties and send that field when rest message is called

komaladsul
Kilo Guru

hello all,

add multiple fields in system properties and send that field when rest message is called.means want to send dynamic field name in integration.

please help

1 ACCEPTED SOLUTION

If you have nested data object in your responseBody then you can use something like this:

var fields = gs.getProperty('propertyName').split(',');
for (var index in fields) {
     var field = fields[index];    
     customBodyObject.data[inputs] = current.getValue(field); //here customBodyObject is object that your are preparing and data is abother object in your jsonBody. current is GlideRecord obj
                    
                }

 

Thanks,
Anil Lande

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

View solution in original post

6 REPLIES 6

Hi,

Did you get chance to check proposed solution? Please let us know if you have any further questions.

 

Thanks,

Anil Lande

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

Hi,

Thanks for response. i resolved my query using your suggested answer.

Thank you