How to clear field value after selecting a value in drop down list in portal ?

Rohit Reddy
Tera Contributor

How to clear field value after selecting a value in drop down list in portal ?

1 ACCEPTED SOLUTION

Mahesh Baraskar
Mega Guru

Hi Rohit,

 

You need to create UI policy for that.  When you select some value in drop down list, a particular value should get selected automatically in another dropdown field.  But, afterwards, as it is not clearing in your case, you need to create another UI policy for set visible as false for that field and set visible TRUE for the field that you want to show up.

View solution in original post

4 REPLIES 4

Mahesh Baraskar
Mega Guru

Hi Rohit,

 

You need to create UI policy for that.  When you select some value in drop down list, a particular value should get selected automatically in another dropdown field.  But, afterwards, as it is not clearing in your case, you need to create another UI policy for set visible as false for that field and set visible TRUE for the field that you want to show up.

suvro
Mega Sage
Mega Sage

Create a catalog UI policy 

with condition

field value is not empty

Configure new UI policy action

select the concerned field and check the check box clear value

 

Mohith Devatte
Tera Sage
Tera Sage

Hello @Rohit Reddy ,

is it your custom form ?

if yes 

can you paste some screenshot for this so that we can see which type of inout field is that and if possible paste the HTML script too?

if its a catalog item 

write an on change client script on the select box field and do 

g_form.clearValue('your field name'); //replace the field name which you want to clear

please mark my answer correct if it helps you

Aziz GUEYE
Tera Contributor

Use this alternatif

g_form.setValue("variable_name", []);

Please check and let me know if still facing the issue.