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 08:03 AM
it's working, i have another requirement also
I have a function setAssignGrpVanity('abc.support@company.net') //setAssignGrpVanity(email)
i need to write a query will look for an entry with that email. If it finds an entry, it will assign the group for the incident as the corresponding group for that incident. In the above example, the assignment group would be set to abc Squad.
Do you have any idea.
Regards,
Ganesh

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-30-2016 08:07 AM
Hi Ganesh,
Thanks. Please mark the post as resolved if the issue is resolved now.
To answer your second question, you can query group table and then based on that you can fetch the group record sys_id.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-30-2016 02:19 AM
Hi,
Please have a look at this: http://wiki.servicenow.com/?title=GlideRecord#gsc.tab=0
I hope this helps.Please mark correct/helpful based on impact
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-30-2016 02:23 AM
Hi Ganesh,
Please go through below link :
Using GlideRecord to Query Tables - ServiceNow Wiki
If you want to query in client sided then you may use getReference() function.
Thanks,
Mihir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-30-2016 02:32 AM
Hi Mihir,
I inbound actions i need to query a table (server side)
i'm watching that link still struck some where.
Regards,
Ganesh.