Options
			
				
					
	
			
		
	- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
11-13-2024 01:48 AM
Hi All,
var matchFound = false;
var queueId = $sp.getParameter('location_id'); // Get current location ID
var gr = new GlideRecord('wu_location_queue');
gr.addQuery('sys_id',queueId);
gr.query();
if(gr.next())
{
var gr1= gr.name;
if (gr1.startsWith("Ben"))
{
matchFound= true
gs.addInfoMessage('test');
}
else
matchFound= false
gs.addInfoMessage('test123');
}
It is giving bothe alert while choosing Bengaluru location .
Can you help me
Solved! Go to Solution.
		1 ACCEPTED SOLUTION
	
		
			Options
			
				
					
	
			
		
	- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
11-13-2024 01:58 AM
var matchFound = false;
var queueId = $sp.getParameter('location_id'); // Get current location ID
var gr = new GlideRecord('wu_location_queue');
gr.addQuery('sys_id', queueId);
gr.query();
if (gr.next()) {
    var gr1 = gr.name;
    if (gr1.startsWith("Ben")) {
        matchFound = true;
        gs.addInfoMessage('test');
    } else {
        matchFound = false;
        gs.addInfoMessage('test123');
    }
}
					
				
			
			
				
			
			
				
			
			
				
			
			
			
			
			
		
		1 REPLY 1
	
		
		
			
			
			
					
	
			Options
			
				
					
	
			
		
	- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
11-13-2024 01:58 AM
var matchFound = false;
var queueId = $sp.getParameter('location_id'); // Get current location ID
var gr = new GlideRecord('wu_location_queue');
gr.addQuery('sys_id', queueId);
gr.query();
if (gr.next()) {
    var gr1 = gr.name;
    if (gr1.startsWith("Ben")) {
        matchFound = true;
        gs.addInfoMessage('test');
    } else {
        matchFound = false;
        gs.addInfoMessage('test123');
    }
}
					
				
			
			
				
			
			
				
			
			
			
			
			
			
		