How to get values from a watchlist and print maximum value in a field ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-10-2017 10:20 AM
My requirement is that suppose there is watchlist named 'services' on a form in which multiple services from 'services' custom table can be added. Now the 'services' custom table has 'tier' field. So, whichever service in the watchlist has lowest tier that service's tier should display in 'Tier' field on the form ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-18-2017 10:29 AM
Hi Khushboo,
As Brad already pointed out, you need to pass on the value from client to server using g_form.getValue() and adding it to parameter
e.g
You need to pass on the incident number to script include via AJAX
You will write something like
var num = g_form.getValue('number');
var ga = new GlideAjax('scriptIncludeNameGoesHere');
ga.addParam('sysparm_name','functionNameWithinScriptInclude');
ga.addParam('sysparm_yourCustomParameter',num);
ga.getXML(callBackFunction);
You will find below useful to understand this
http://wiki.servicenow.com/index.php?title=GlideAjax#gsc.tab=0