to compare variable field data present in user table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2016 05:31 AM
I have created variable field type as Reference and mapped to Custom table.
Now i want it to compare with user table (name field), whether the name is present or not.
please share if you have business script
Thanks in Advance
Kavya

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2016 06:48 AM
Good catch. I forgot that the variable is a reference field and returns a sys_id. Thanks for catching that Pradeep.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2016 06:48 AM
Corrected, it would be more like:
var gr = new GlideRecord('sys_user');
if (gr.get('name', current.variables.u_authoriser.getDisplayValue()))
// You have a match
else
// no person found in sys_user with that name