- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2025 03:24 AM
Hi All , this script is not working properly :
HTML:
<div ng-if='c.data.matchfound' >
<p>Please select one of the service lounges below </p>
</div>
Server side:
var queueId = $sp.getParameter('location_id');
var gr3= new GlideRecord('wu_location_queue');
gr3.addQuery('sys_id',queueId);
gr3.addEncodedQuery('nameSTARTSWITHME^active=true');
gr3.query();
if(gr3.next())
{
data.matchfound='true';
gs.addInfoMessage('test')
}
else{
data.matchfound='false';
gs.addInfoMessage('fail')
}
In the HTML side it is not working fine
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2025 04:01 AM
it will be
<div ng-if='c.data.matchfound' >
<p>Please select one of the service lounges below </p>
</div>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2025 03:32 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2025 03:33 AM
It is picking correct current location
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2025 03:36 AM
Hi @chandanpatra ,
For $sp.getParameter() you need to check the URL of the page to get valid parameter.
For example: /id=sc_cat_item&sys_id=3f1dd0320a0a0b99000a53f7604a2ef9 if you take this URL and use $sp.getParameter() you will get different results based on parameters you pass:
$sp.getParameter('id') this will return sc_cat_item
$sp.getParameter('sys_id') this will return 3f1dd0320a0a0b99000a53f7604a2ef9
Please check in server what value it returns.
Thanks
BK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2025 03:37 AM
Server side is working fine , but the HTML is not working , c.data.matchfound I am getting correct answer