Urgent: Servicenow Integration

Charan Vedurupa
Tera Contributor

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 @Charan Vedurupa ,

 

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
Tera Patron

@Charan Vedurupa 

So what's your business requirement here?

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

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".