How to add a filter condition variable/field to a catalog item on portal page

Gauri Sharma
Kilo Contributor

How to add a filter condition variable/field  to a catalog item on portal page?

I want to create a catalog form on a service portal, where I need to select source and condition based on source selected.

as in the below snap I get options to select one or more condition values, like wise I need some variable/ field where I can select multiple values.. how can I implement the same in catalog form?

 

 

Please find the below snap for reference.

find_real_file.png

5 REPLIES 5

AnirudhKumar
Mega Sage
Mega Sage

There is no catalog variable to bring a filter condition on the form. 

However you can achieve the functionality you are looking for using a different approach.

 

Let's say you expect the user to add just 2 filters - one for Risk and one for Service(as shown in the snapshot)

Create a one Selectbox field called Risk and create choices for it as present in the backend Risk field.

Create a Reference field called Service referring to whichever your table you want it to.

 

Although both these fields are different they can logically they can act together giving you your query for further processes

 

Note : Technically it is still possible to create a UI macro and use HTML and javascript to build the filter condition UI. But that's a lot of needless effort. 

 

Long Live ServiceNow!

Thank you Anirudh for the response, 

Select box option may not work in my situation, as I need multiple values.. 

 

Thanks again for the UI macro suggestion.. will think on that part, do we really need the requirement to be completed or can modify the requirement.

 

Regards,

Gauri

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

you can try to use UI page type variable

check the below links. It may help you.

How to add condition builder on UI Page?

Condition Builder

Regards
Ankur

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

@Gauri Sharma 

Thank you for marking my response as helpful.

If my response helped you please mark it correct to close the question so that it benefits future readers as well.

Regards
Ankur

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