Script to call and compare fields from two different tables

Arif6
Giga Contributor

Can someone guide me how to write JavaScript codes in Script include function for calling and comparing fields from two different tables?

For example F1 & F2 from table1

field F3 & F4 from table2

 

If I had to wrote a function based on the fields value of F3/F4 comparing with F1&F2

Line if F3 or F4 is between the values of F1 & F2..somthing like that return value from another field from table1

2 REPLIES 2

Nayan  Dhamane
Kilo Sage
Kilo Sage

Hello @Arif6 ,

Please use Glide record twice separately for different tables to get the data from the two table you require. If you have a dependency between the records or a common link you can use that as well.

Kindly let me know if you require more detailed solution along with your detailed problem statement.

BR,
Nayan

If my answer solved your issue, please mark my answer as Correct & Helpful based on the Impact

Best Regards,
Nayan Dhamane
ServiceNow Community Rising Star 2023.

Arif6
Giga Contributor

Thanks Nayan, Appreciate your response on this!

I used the Gliderecord for twice for these two tables (both are independent custom tables)

however, I am not able to write the codes further, are you able to look at my query here which i explained in detail & share some scripts for this specific scenario? Thank you again!

 

https://www.servicenow.com/community/incident-management-forum/script-include-function-script-for-co...