when we select operation variable choice value is 'new', code material should not be mandatory

Srinivasu2
Tera Contributor

Hi Community,

 

when we select operation variable choice value is 'new', code material should not be mandatory

 

Srinivasu2_0-1697009353577.png

Could you please suggest how can we achieve this

 

Srinivasu2_1-1697009481018.png

 

 

Thanks & Regards,

Srinivasu

7 REPLIES 7

Shamma Negi
Kilo Sage
Kilo Sage

Hi @Srinivasu2,

 

Please try to use the UI Policy for this.

Add the condition - 

Data Master is material and operation is new.

 

Add UI Policy Action.

Code Material - mandatory (false), visible true or leave alone

 

 

Also, you can write client script pn change of operation :

 

If (newValue == "New")

{

g_form.setMandatory ("<code_field_name>", false);

 

}

 

Hope this helps

Regards,

Shamma

Mark this as correct and helpful if this resolves your issue.

 

Thanks

Anand

Regards,Shamma Negi

It's works fine in catalog form, but it doesn't work in RITM even though i checked "Applies on Requested Items"

please check below screenshots and advise

Srinivasu2_1-1697029604452.pngSrinivasu2_2-1697029629906.pngSrinivasu2_3-1697029667582.png

 

 

Thanks & Regards

Srinivasu 

 

 

Shubha_Prada
Tera Guru

Hi @Srinivasu2,

You can use the UI Policy for this. (Please ensure to check the reverse if false field)

  • Add the condition -
    Operation is new
  • Add UI Policy action
    Code Material - mandatory (false)

If you already have this UI policy configured and facing an issue. Review if the "Code Material" variable is made mandatory on the variable if it is made mandatory, ensure to uncheck it and then test it. That will allow the UI policy to work as expected.

 

Please note that whenever you have set a variable as mandatory on the variable level, the UI policy mandatory configuration may not work as intended.

 

Please mark this as correct and helpful  if this resolves your issue.

 

Best Regards,

Shubha