cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MatteoVeronesi
New Member

Custom PCF check for required column

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?

1 ACCEPTED SOLUTION

Accepted Solutions
DianaBirkelbach
Super User
Super User

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

Kind regards,
Diana
----------
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

2 REPLIES 2
DianaBirkelbach
Super User
Super User

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

Kind regards,
Diana
----------
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

MatteoVeronesi
New Member

Thanks, for the further explanation.
In the meantime I have solved it and can confirm that the module takes care of it itself.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Microsoft Ignite 768x460.png

Find your focus

Explore the latest tools,training sessions,technical expertise, networking and more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,638)