Need to get all options from a field (lookup selectbox) on load of form

R Akash
Kilo Expert

Hello 

I have a field(lookup select box) which is referred to topic category table. i have reference qualifier which will bring categories based on some logic. we are showing only unique categories here. Is there anyway i can get all options of the field on load of form. I tried getoption method but looks like it will not work in portal.

 

 

Thanks

Akash 

8 REPLIES 8

Hi,

no other way other than Ajax

Regards
Ankur

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

Hello Ankur

Is it possible to set value of "lookup select box" with category name instead sysid. I tried by sending category name through url parameter. But looks like "lookup selectbox" expecting sysid so i am not able to populate category.

 

 

Thanks

Akash

Abhijit4
Mega Sage

Hi Akash,

If you need all those filtered records on load of the form then you could write Display BR and use the filter same as that of reference qualifier. You can access all that data in client script by using g_scratchpad object.

Let me know if you have any further queries.

Please mark this as Correct or Helpful if it helps.

Thanks and Regards,
Abhijit
Community Rising Star 2022

By marking my response as correct or helpful, you contribute to helping future readers with similar issues.
Regards,
Abhijit
ServiceNow MVP

Hi Abhijit

i am using catalog client script. In my scenario when user clicks on content item it will redirect to the form and i need to populate category. i am sending sysid through URL Parameter. but i have same category name in different COES with different sysids.

for example

i am having category ABC in payroll, performance, total reward tables but sys id are different. On load of form it randomly picking up any one of them due to unique checkbox is true. so i am not able to set sysid. if i get all unique options present in that field on load i can compare that with url parameter and i can set.

 

 

Thanks

Akash