Make field mandatory based on true/false field update

rin1
Kilo Guru

Hi all,

I was trying to make a field mandatory, when a true/false field is updated on a sys_user form. I tried UI policy but it dint work the way I wanted.

This is the scenario, when someone enables/disables coreHR, Change log should be made mandatory. Can anyone help me achieve this?

find_real_file.png

 

Thanks

Rini

11 REPLIES 11

Ramesh Kandhan
Tera Contributor

Hi Rini,

 

Please create onchange client script for sys_user table and you can write logic like below

 

if(newValue){

g_form.setMandatory('fieldName',true);

}

else

{

g_form.setMandatory('fieldName',true);

}

 

I hope this is helpful for you.

 

Thanks,

Ramesh Kandhan

Thank you for ur reply. Unfortunately its doesnt work. Whenever there is an update made to the field 'Enable CorehR' (True or False), change log field should be made mandatory. (Users should comment why the field is enabled or disabled). Not sure what Iam missing.

find_real_file.png

 

Rini

Aniket Sawant2
Giga Guru

Hi you can use ui policy as follow

find_real_file.png

 

 

 

 

find_real_file.png

Thanks for ur reply. Unfortunately this is how I implemented in the first place, but its doesnt work. Whenever there is an update made to the field 'Enable CorehR' (True or False), change log field should be made mandatory. (Users should comment why the field is enabled or disabled).

 

Rini