Condition field help

SM16
Tera Expert

Hi Team,

 

I am building a custom application where we have a routing table to route the tickets based on the filter condition

 

For filter, I have used a condition field with attributes as follows

 

edge_encryption_enabled=true,readable=true,staticDependent=sc_req_item

 

If you look at the filter, it first asks you to click on "Show related" fields, then Variables, select an item, then select variable which is a bit tedious job for the users managing the application.

 

Is there a way where I can allow users to select the catalog item or record producer and they can directly add the filters for the associated variables like we do for normal dictionary fields?

 

SM16_0-1709979255790.png

 

2 REPLIES 2

Allen Andreas
Administrator
Administrator

Hi,

My apologies, your post was a bit confusing, but what I think you're saying is that you want to pre-populate some of the condition builder for them so that they're only having to pick a few things?

If so, you can use an onLoad client script (for new records) on this to set the condition field to get it started. Conditions are built much like encodedQueries and so you could set it like:

g_form.setValue('condition_field_name', 'encodedQuery_here');

 


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @SM16 

 

If you look at the filter, it first asks you to click on "Show related" fields, then Variables, select an item, then select variable which is a bit tedious job for the users managing the application.

Atul: This is OOTB and as per design , and there is reason behind this, as variables can be used in many other item as well, so to avoid confusing, we need to select the item first.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************