Combine Script Plus ac columns in reference field syntax

anfield
Tera Guru

Is there a way to combine a script call and the ref_ac columns attribute on a reference field?

 

Current reference qual: javascript:'sys_idIN' + getPortfolioProgramIds(current.portfolio, current.getTableName());

 

I want to add an additional column from the table this is pointing at, which would be something like this: 
ref_ac_columns=u_sub_category, ref_ac_columns_search=true,ref_auto_completer=AJAXTableCompleter.

 

What would be the correct way to have the syntax of both when combined into the reference qual?

 

The desired outcome is that in the reference field I can display both columns when searching.

 

(The script above returns programs, and the subcategory field is part of the same record on the same form)

 

 

 

 

1 ACCEPTED SOLUTION

Brad Bowman
Kilo Patron
Kilo Patron

These are not combined - the Reference Qualifier is fine, and the other things you mention are added to the Attributes field.

BradBowman_0-1742404437089.png

 

View solution in original post

4 REPLIES 4

Brad Bowman
Kilo Patron
Kilo Patron

These are not combined - the Reference Qualifier is fine, and the other things you mention are added to the Attributes field.

BradBowman_0-1742404437089.png

 

Ok. How can i achieve my goal? I want to leave the script as is, but have 2 columns in the reference field displayed

Missed that part. Got it thanks

Ankur Bawiskar
Tera Patron
Tera Patron

@anfield 

both are different things.

ref qualifier helps to restricts

to add additional column add this and use this syntax

ref_ac_columns=u_sub_category;fieldName, ref_ac_columns_search=true,ref_auto_completer=AJAXTableCompleter.

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