I added a PCF Custom control to a column in model-driven app.
The column is required by a business rule but the form field is not mandatory (no red star and no check).
I tried to check if there was a property to control it in the code by I'm not able to access this property.
I can find is disabled or not (context.mode.isControlDisabled) but not if it's mandatory.
Any Ideas?
Solved! Go to Solution.
Hi @MatteoVeronesi ,
You have access to isControlDisabled and isVisible, but required is not available (at least not in a supported way).
The form will take care of it by itself though.
If your PCF needs to behave different if it's required, you could make anothe property for the PCF (like required, of type boolean). It can be of type input or bound, it depends if you need to set the property at runtime or not. If the value can change, you can set it using additional form scripting or business rule.
Hope this helps!
Kind regards,
Diana
Hi @MatteoVeronesi ,
You have access to isControlDisabled and isVisible, but required is not available (at least not in a supported way).
The form will take care of it by itself though.
If your PCF needs to behave different if it's required, you could make anothe property for the PCF (like required, of type boolean). It can be of type input or bound, it depends if you need to set the property at runtime or not. If the value can change, you can set it using additional form scripting or business rule.
Hope this helps!
Kind regards,
Diana
Thanks, for the further explanation.
In the meantime I have solved it and can confirm that the module takes care of it itself.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.