Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Urgent: Servicenow Integration

Not applicable

Hi Team,

 

Does any one know how to compare two fields on different tables in ServiceNow by using integration?

User submit with "Name : Abel Tuter" In instance 1, it will check in instance 2 User table "Name".  If it is correct record will insert else record not insert.

 

For ex.

Instance 1:

Table1 : Test

Field : Name - String

Instance 2:

Table2 : User Table

Field : Name (sys_user)

 

Please help...

 

Thanks,

Charan

 

3 REPLIES 3

SunilKumar_P
Giga Sage

Hi @Community Alums ,

 

You can have a check in your script (Instance 2) something like below.

 
var userName = "xxxxx" //Store the user name
var grUser = new GlideRecord("sys_user");
if(grUser.get("name", userName)){
//Continue with your script to insert the record.
} else{
//Abort your action.
}
 
Thanks,
Sunil

Ankur Bawiskar
Tera Patron

@Community Alums 

So what's your business requirement here?

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

Not applicable

Thanks for reply.
We want to create on record in "Test Table" field name value(Name) in Instance 1 by compare with another instance 2 'user table' field "name".