Making Fields Visible Under Conditions

ajlabate
Kilo Expert

I have created 4 fields for my Incident form but I only want them to be visible when a particular Subcategory is chosen.   How can I do this?   Is it a Business Rule?   A UI Policy?   Something else?

18 REPLIES 18

mronkhan
Kilo Explorer

You can accomplish this either by using UI policy or Client Script.



For client script you can use onChange and within the script check for condition like g_form.getValue('subcategory')=="Your chosen category" and then use g_form.setVisible('field name to make invisible', false)



If you decide to use UI policy then it is a simple UI policy with condition subcategory is what you want and then chose the field that you wish to make invisible and use true or false accordingly


Not sure how in the UI Policy to make certain fields visible.   Is it in the script that gets executed if the subcategory condition is met?   If so, what would the script look like?


Here is an example. Use any condition and then make Visible=false


In my example the field is hidden/invisible all the time but you can use any condition


I hope this will help


example.JPG


IK


Both the screen shots appear to be from non Eureka releases.   My form is a bit diffferent:



UI Policy Form.png


This is the Script Tab page:


UI Policy Form - Script Tab.png


You need to submit the UI Policy to see the Policy actions.