Validating on null managed metadata fields

Hi, I have a managed metadata field that needs to be mandatory if another field is set to No. I've tried to create a rule using isNullOrEmpty on the metadata control 

Audience=="No" && isNullOrEmpty({Self})

but that doesn't work and some research has shown that that function isn't supported on metadata fields. How can i force users to enter something in the metadata field when they select No in the audience field?

0 Kudos
1 Reply

Re: Validating on null managed metadata fields

If you open the Validation section of the Managed Metadata control, it states that in order to test its value, you need to use JavaScript. In which case you need to give it a JavaScript client ID (as well as for the Audience field as you need to check this as well in the JavaScript code) and in the form's Custom JavaScript add code to be executed if the .change() is triggered; if you have more managed metadata fields, you might consider to use one of the Filler events to implement the check of all MM fields.


Hopefully this short description is enough to get you going.

0 Kudos