Lookup Select Box

kirankr2061
Tera Contributor

I am using a variable lookup select box in my catalog and the column is refering to the reference field from another table if I var a = g_form.getValue(lookup Variable) what is the value I am going to get ?

1 ACCEPTED SOLUTION

@kirankr2061 

I was wrong. It gives the sysId of the referenced record within that table.

See below, I am referring to Department table and Lookup value = Department Head (Reference to sys_user) and it gave me sysId of user

1) Variable configuration

AnkurBawiskar_0-1749460252953.png

 

2) alert for printing the variable value

AnkurBawiskar_1-1749460271981.png

3) sysId of user

AnkurBawiskar_2-1749460342385.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

View solution in original post

3 REPLIES 3

Ankur Bawiskar
Tera Patron
Tera Patron

@kirankr2061 

what do you mean by column is referring to reference field from another table?

share some screenshots etc

with this line it should give you the record sysId

g_form.getValue(lookup Variable)

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

kirankr2061_0-1749459648270.png

column which refreing another table 

kirankr2061_1-1749459681052.png

 

@kirankr2061 

I was wrong. It gives the sysId of the referenced record within that table.

See below, I am referring to Department table and Lookup value = Department Head (Reference to sys_user) and it gave me sysId of user

1) Variable configuration

AnkurBawiskar_0-1749460252953.png

 

2) alert for printing the variable value

AnkurBawiskar_1-1749460271981.png

3) sysId of user

AnkurBawiskar_2-1749460342385.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

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