Is it possible to build the condition builder in Portal?

Hao5
Kilo Contributor

Hello talents,

Is it possible to build something like the 'condition' field type in Portal?

Something like this 🙂

find_real_file.png

 

Thank you so much!

3 REPLIES 3

Ajay_Chavan
Kilo Sage

yes

 

How to enable Edit Filters on list for end users in Service Portal widgets?
1934 views
Number: KB0687054 
 

Description



Description


How to enable Edit Filters on list for end users in Service Portal?

 

Currently, end users are not able to edit the filters in Service Portal widgets. When the users expand the "My open incidents" widget, they get the default filter as -
All > Caller is User .or. Watch list CONTAINS ( User ) > Active = true.
 
But they do not have access to edit the filter instead they can edit the applied filter via the URL. How can we use to enable filter to perform condition builder?
 

Procedure


This is expected behavior in Service Portal widgets.
 
In Service Portal, "Data table from instance definition" widget to display the list of records.
The condition builder is only available for "Data Table from URL definition widget". The Data Table from URL definition widget displays the table you select from the list.
 
Refer:
 
 
 
 
Both "Data Table from URL definition widget" and "Data table from instance definition" embed the same widget "widget-data-table".
 
If you're using Data Table from Instance definition the filter has to be set in the widget instance options. 
You can make it work by passing 'enable_filter' as true. 

Applicable Versions


Any ServiceNow release with Service Portal (e.g Kingston at the time of publishing this article)

Additional Information


Refer some Community links:

 
Glad I could help! If this solved your issue, please mark it as Helpful and Accept as Solution so others can benefit too.*****Chavan A.P. | Technical Architect | Certified Professional*****

Thousif S N2
Tera Contributor

Hi,

I have a similar requirement were you able to achieve this?

If yes, could you please help me out

 

Gabriel Gasperi
Tera Contributor

I think you can,

There is a default widget called SN Desktop Filter

GabrielGasperi_0-1769104350448.png

That is used by the widget id: widget-filter-breadcrumbs
That is used by the widget id: widget-data-table

You have to pass on the addition options json of Data table from instance definiton,
because it is not exposed on options schema, to edit by instance options modal

GabrielGasperi_2-1769104852917.png


This is the result with enable_filter: true, we have the condition builder!

GabrielGasperi_1-1769104806960.png