Comma separated value of system properties is not working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2022 10:08 AM
Hi,
I have added the approver email id in system property value. I have configured the approvers by using system properties in some catalog items. if value is having one approver it working properly.
when I add more than one email id's with Comma seperated it's not working. how to get two approvers by adding value in system property?
script Include:
if(r == 'test_BSBS')
a.push(this.getApproverSysID('hbw.approvers.bs.test_bsbs'));
return a;
},
Thanks,
Rajesh Bandila
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2022 10:12 AM
Hello rajesh,
Can you paste here the code of the method that is consuming your system property?
It all depends on the way you are processing the system property.
I'll be waiting for your feedback!
Best Regards,
Filipe Cruz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2022 10:20 AM
var approverUtil = Class.create();
approverUtil.prototype = {
initialize: function() {
},
gs_hardware: function(obj) {
if (obj.org != "GS")
return;
gs.info("JSON "+ new JSON().encode(obj));
var r = obj.gsnow;
var a = [];
if(r == 'backup')
a.push(this.getApproverSysID('hdw.approvers.gs.backup'));
if(r == 'UPS')
a.push(this.getApproverSysID('hdw.approvers.gs.UPS'));
return a;
},

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2022 02:21 PM
Hello rajesh,
Is the method getApproverSysID the one having the property has input parameter?
If so, can you show the code of that method?
Thanks!
Best Regards,
Filipe Cruz

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2022 04:35 PM
Hi Rajesh
Try converting an array to a comma delimited string at the end.
Instead of
return a;
Try
return a.join(',');