- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2014 06:57 AM
Hi All,
I have a variable editor at the Request Item table and the elements vary from one record to another (they start with "ni.VE"). I am able to retrieve these values via Label with this client-side code:
var labelList = document.getElementsByTagName('label');
var tempElem, tempName, tempID;
for (var i = 0; i < labelList.length; i++) {
tempElem = labelList[i].firstChild;
tempName = tempElem.data;
tempID = new String(labelList[i].getAttribute('for'));
if (tempID.indexOf("ni.VE") > -1) {
alert(tempName + '\n' + tempID + '\n' + $(tempID).value);
}
}
From wiki, g_scratchpad passes values from server-side to client-side.
Question: How do we pass values from client-side to server-side?
Thanks,
Dor
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2014 07:07 AM
Hi Salvador,
I can understand that you are trying to pass the variables from client side to server side. Instead try the below script directly in a business rule to access the variables in the variable editor.
Script:
for (key in current.variables) {
var v = current.variables[key];
if(v.getGlideObject().getQuestion().getLabel() != '') {
gs.addInfoMessage(v.getGlideObject().getQuestion().getLabel() + " = " + v.getDisplayValue() + "\n");
}
}
Try this and let me know the outcome!
Please mark answer as correct/helpful, if it was really helpful.
Regards,
Solutioner
Enhance Knowledge NOW@ www.solutioningnow.com
http://www.solutioningnow.com/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2014 06:50 AM
Yes...I guess we need someone with admin rights to change the category of this post...(I don't see any link/button for accepting your reply.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2014 06:50 AM
or a Moderator.....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2014 09:24 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2014 09:35 AM
I set the thread as a question and marked your reply as correct.
