Override UI policy action for a multiple choice field in RP.

Biso_Boby
Tera Contributor

Have a Multiple choice field with Yes/No options in RP.

On Selecting location field as xyz, the above choice field option 'Yes' should be greyed out. 

 

But there are already associated UI policies and actions running on that multiple choice field, which are hindering the client script to work when used removeOption/setDisabled in a catalog client script to grey out 'Yes' option.

Can you please suggest, what is the best approach here, and workaround?

 

@Sandeep Rajput @Community Alums @Satishkumar B @AnveshKumar M 

6 REPLIES 6

Mark Manders
Mega Patron

Even though you didn't ask me (and thankful for that, because being tagged in questions is the worst), I think you need to get back to the drawing board. Just go through all the logic and see which ones you can combine and which ones are separate, so your end solution takes all options into account. 

If you are colliding now, you need to find another way and that's to go back and start over in this case.

 

If there are any follow ups with more information because help is needed, can you also let us know how a yes/no choice field can be used as multiple choice? Technically I understand it, because it's just two strings you can put into the field, but functionally it sounds weird that you can have both selected.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

Thank you @Mark Manders for your response!!

Sorry, IF i have not put it in the right way.

Its a multiple choice type field, with choices Yes/No. 

 

Question is simple,  whether we can bypass existing ui policy actions for a field which is set to mandatory and create a onchange client script to disable the choice field option . If so , how?

A multiple choice field by definition allows multiple options to be chosen, so in your case both yes and no can be chosen at the same time? That's weird.

And your question is not simple, because you say that your client script doesn't work because of existing ui policies and actions. To get around that, you need to get back to the drawing board to include all your logic to apply at once. A solution could be to use the script part of the UI policy that is in the way, to do something with your values. We can't look into your instance, so we don't know what all of those ui policies are doing and how they are interfering with you client script.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

Sandeep Rajput
Tera Patron
Tera Patron

@Biso_Boby Using Client script and UI Policy together to set fields visible/mandatory/read only can cause a lot of confusion to the developers. I recommend you either use UI Policy or use client script for this purpose to completely eliminate any confusion.