Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to enable 'category picker' on the category field on a knowledge form?

Akif Shah
Tera Contributor

This is what i see when i click on the category reference icon


find_real_file.png

 

How do i get the category picker like below to pop up?

 

find_real_file.png

1 ACCEPTED SOLUTION

chinmayap1
Kilo Expert

Hi,

Use Field decoration attribute for the filed "kb_category" and call the OOB UI Macro as below.

field_decorations=kb_category_reference_lookup

View solution in original post

5 REPLIES 5

Harsh Vardhan
Giga Patron

if you want to enable tree picker functionality for category then you need to create custom reference field on kb_category table and that field should reference to the kb_category itself then add "tree_picker = true" in category field attribute.

 

eg: create reference type field (field name= "Parent" ) on kb_category table. and this should reference to the kb_category table.

tor-werner
Giga Contributor

Did you ever find a solution to this? I have the same issue

tor-werner
Giga Contributor

The attribute for the kb_category field is a reference to the UI Macro 'kb_category_reference_lookup'.

I defined a new macro and just changed line 99 and 100 to my custom field. 

E.g.:

99. var category_form_id = 'element.' + '$[jvar_table_name]' + '.u_publish_in_category';
100. var category_link_id = 'a[id="lookup.' + '$[jvar_table_name]' + '.u_publish_in_category"]';

Priti Golam1
Tera Expert

Hello,

 Did you get a solution for this?? . I also have the same requirement