Hide the field using business rule

karishmashaik
Kilo Expert

Hi team,

my  requirement is I have one choice field based on that field attachment field  should visible while selecting choice field ,by using UI policy in new state I have written this it's working fine, my second requirement is attachment field  should visible for one particular group but the attachment field  is should not visible any groups in next state  please help me on this .

I have written business rule (scratch pad), onload client script but it's not working:

function onLoad() {
var openedBy = g_form.getValue('opened_by');
if ( openedBy == g_user.userID || g_scratchpad.cost ) {

g_form.setDisplay('u_ach_bank_form', true);
g_form.setMandatory('u_ach_bank_form', true);

 

} else {
g_form.setMandatory('u_ach_bank_form', false);
g_form.setDisplay('u_ach_bank_form', false);

 

}
}

 

 

 

Thanks,

karishma

 

5 REPLIES 5

palanikumar
Mega Sage

Add alert and see whether scratchpad is having correct value

alert(g_scratchpad.cost)

Also try setVisible instead of setDisplay function.

Thank you,

Palani

Thank you,
Palani

Logan Poynter
Mega Sage
Mega Sage

Hello karishma,

Why not create an additional condition in your UI Policy to show the attachment field based on your conditions? 


Please mark my answer as correct/helpful if it has helped you.

Thanks,
Logan

 Hi Logan Poynter,

 

I am using UI policy 

image

Hello karishma,

Right, if this should only apply to one particular group what happens with a condition of Assignment Group is {Group}?


Please mark my answer as correct/helpful if it has helped you.

Thanks,
Logan