How to query a table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-30-2016 02:13 AM
Hello Experts,
I have a table with 3 columns
Group
Support Email
Urgent Email
I want to Query the table based on Group i need to set the remaining two fields (Support n Urgent)
For ex if Group is hr, i want hr.support@xx.net and hr.urgent@xx.net in corresponding fields...
it is possible through glide query, so which condition i need to write here.
Can you please give some idea.
Regards,
Ganesh.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-30-2016 03:04 AM
what is the group name you want to compare against?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-30-2016 03:18 AM
here squad, support email and urgent email are the fields,
if squad name is SNOW
support email should be snow.support@company.net
urgent email should be snow.urgent@company.net
I need to query the table based on squad through glide query.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-30-2016 03:22 AM
Hi Ganesh,
Try this.
var group=new GlideRecord('u_team_vanity_emails');
group.addQuery('u_squad.name',squad);
group.query();
if(group.next() && group.u_squad != ' '){
current.u_support_email=xx;
current.u_urgent_email=xx;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-30-2016 05:27 AM
Hi Pradeep,
this is fine
var group=new GlideRecord('u_team_vanity_emails');
group.addQuery('u_squad.name',squad);
group.query();
if(group.next() && group.u_squad != ' '){
current.u_support_email=group.u_support_email;
current.u_urgent_email=group.u_urgent_email;
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-30-2016 06:14 AM
You mean it is working fine now