to compare variable field data present in user table

kaushalya1
Kilo Expert

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

6 REPLIES 6

Good catch. I forgot that the variable is a reference field and returns a sys_id. Thanks for catching that Pradeep.


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