How to query a table

ganesh7
Kilo Contributor

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.

14 REPLIES 14

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


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.


amlanpal
Kilo Sage

Hi,



Please have a look at this: http://wiki.servicenow.com/?title=GlideRecord#gsc.tab=0


GlideRecord - ServiceNow Wiki



I hope this helps.Please mark correct/helpful based on impact




Mihir Mohanta
Kilo Sage

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


Hi Mihir,



I inbound actions i need to query a table (server side)


i'm watching that link still struck some where.



Regards,


Ganesh.