Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
Absent Member.. HaythamFekry Absent Member..
Absent Member..
286 views

Adding SRC user selections on email notifications

Gents,

 

 

Is there any way to add the user selections selected from the SRC on email notifications .... The user selections are viewed on the interactions records in the tab "Catalog Information", I need to view those fields on email notifications.. Any ideas ?

 

Apreciate your kind support.

 

Best Regards,

Haytham Fekry

0 Likes
3 Replies
Trusted Contributor.. Abhishek Srivas Trusted Contributor..
Trusted Contributor..

Re: Adding SRC user selections on email notifications

Hi,

 

The user selections which are present in the interaction form is xml data, therefore you cant directly capture it in the notification.

What you can do is parse the user options and store the results in a variable and you can use it in the notification.

or the values which are there in the variable can be stored in a field as well, and then it can be used in the notification.

 

 

HTH

ABhishek

0 Likes
Highlighted
Acclaimed Contributor.. Kelalek2 Acclaimed Contributor..
Acclaimed Contributor..

Re: Adding SRC user selections on email notifications

I'd like to add that it's worth checking HP made scripts how to parse through the XML tree.

 

For example following libraries are good starters:

svcCatInterface

svcCatConnectorWizards

xmlHelpers

---
Moving on, this account is no longer active. Best regards, Kelalek
- So Long, and Thanks for All the Fish
Mouad_1 Frequent Contributor.
Frequent Contributor.

Re: Adding SRC user selections on email notifications

I didn't know about xmlHelpers (Thanks), I have tried using my own one :


function parseXMLoptions(xmlStr) {
var xmlObject = new XML();
var ret = new Array();
xmlObject.setContent(xmlStr);
var xml = xmlObject.getDocumentElement();
el = xml.getFirstChildElement();
while ( el != null ) {
attr = el.getAttributeValue('id');
vall = el.getValue();
ret.push(attr);
ret.push(vall);
eval("system.vars."+attr+"=\""+vall+"\"");
el = el.getNextSiblingElement();
}
return ret;
}

 

This function parse options from the submitted request ticket and return array like {"optionName1", "value1", "optionName2", "value2"} .. etc}
Moreover, it create new System vars whos names are the options names, and values are the options values

 

Maybe you can use those vars in notifications

 

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.