- 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:42 AM
in server side update like below and try
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')
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā01-20-2025 03:44 AM
I am telling to that SErver side script is working fine but the HTML side is not working and we are receiving the data "c.data.matchfound " correct data
<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:45 AM
its failing because you retuning as string from server side and comparing as Boolean value.
Please update the
data.matchfound=false
data.matchfound=true
it will work fine
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā01-20-2025 03:51 AM
<div ng-if='data.matchFound ' >
<p>Please select one of the service lounges below </p>
</div>
It is not working
- 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>