Skip to main content

ServiceNow Service Catalog Advanced Reference Qualifier in SCOPED app -CHALLENGES (List Collector)

 ServiceNow Service Catalog Advanced Reference Qualifier in SCOPED app -CHALLENGES (List Collector)


in the list collector reference qualifier I am passing the value of a reference variable to the script include

I found it necessary to 
  • pass it in this format using toString()
  • use the fully qualified api name (including the api scope, in this case  x_cls_clear_skye_i
  • do not use ref_qual_elements in the variable attributes box
  • seems necessary to click the 'run filter' button on the list collector to pull back the results


    in order for it to work:

javascript:new x_cls_clear_skye_i.myScriptInclude().testFunction(current.variables.account.toString());


script include example function:

testFunction: function(sAccount) {
gs.warn('test::ClearSkyeTableServerSide.testFunction-sAcc='+sAccount);
//gs.warn('test::ClearSkyeTableServerSide.testFunction-');
return ('sys_id=d1e1c87e9769ad10df843a300153af45');
}


seems to work with both client callable and non client callable script includes, in this case I kept it server side



Comments

Popular posts from this blog

Get URL Parameter - server side script (portal or classic UI)

Classic UI : var sURL_editparam = gs . action . getGlideURI (). getMap (). get ( ' sysparm_aparameter ' ); if ( sURL_editparam == 'true' ) { gs . addInfoMessage ( 'parameter passed ); } Portal : var sURL_editparam = $sp . getParameter ( " sysparm_aparameter " ); if ( sURL_editparam == 'true' ) { gs . addInfoMessage ( 'parameter passed ); }

URL link in addInfoMessage

var ga=new GlideAjax('gld_HR_ajax'); ga.addParam('sysparm_name', 'checkEmployeeNumber_hrProfile'); ga.addParam('sysparm_hrprofilenumber', g_form.getValue('number')); ga.addParam('sysparm_employeenumber', newValue); ga.getXMLAnswer(function(answer) { if (answer!='undefined' && answer!=''){ var navURL="<a style='text-decoration:underline;color:blue' href=hr_profile.do?sysparm_query=number=" + answer + ">" + answer + "</a><img width='3' src='images/s.gif'/>"; var sMsg='The employee number entered already exists on another HR Profile ' + navURL; //alert(sMsg); g_form.showErrorBox('employee_number', 'error - please check'); g_form.addInfoMessage(sMsg); } });