cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MJ2019
Level: Powered On

Is PCF framework form aware?

Hi everyone,

I'm new to PCF framework. I've got few questions ,can anyone help me out with these ?

1)Is PCF framework form aware? What I mean is that can I check if a custom control "X" exists on form ?

2)Can I read values from other custom controls on form ?
3)can I get list of all custom controls on form ?
4)If above scenarios are not possible then what's work around?

 

Cheers,

Murtaza Jaffari

1 ACCEPTED SOLUTION

Accepted Solutions
Power Apps Staff HemantG
Power Apps Staff

Re: Is PCF framework form aware?

>>  4. For (1) and (3) you could analyse the Form XML programatically.

 

Don't access the DOM outside control , it breaks the contract and is unsupported. Instead you should have additional input property to the control which feeds in though the second field attribute. PBL works on the field controls irrespective of the control OOB or custom - see https://blogs.technet.microsoft.com/lystavlen/2013/10/13/crm-2013-understanding-portable-business-lo...

 

You can add a PBL rule on top of controls to set the value of the input property and signal it acordingly.

 

View solution in original post

9 REPLIES 9
PaulMare
Level: Powered On

Re: Is PCF framework form aware?

So a PCF control is coupled to the form via the field and dataset properties defined in the manifest.

1. The control itself knows quite a lot about the environment (see the context object), but does not have access to form aspects like "does custom control 'X' exist on form.

2. You can read values from any other from field by specifying it as an input property on your manifest. Note that you would be reading the value of the field on the form, not the value from a "custom control on form".

3. This is outside the scope of PCF.

4. For (1) and (3) you could analyse the Form XML programatically.

MJ2019
Level: Powered On

Re: Is PCF framework form aware?

Thanks @PaulMare 

Power Apps Staff HemantG
Power Apps Staff

Re: Is PCF framework form aware?

>>  4. For (1) and (3) you could analyse the Form XML programatically.

 

Don't access the DOM outside control , it breaks the contract and is unsupported. Instead you should have additional input property to the control which feeds in though the second field attribute. PBL works on the field controls irrespective of the control OOB or custom - see https://blogs.technet.microsoft.com/lystavlen/2013/10/13/crm-2013-understanding-portable-business-lo...

 

You can add a PBL rule on top of controls to set the value of the input property and signal it acordingly.

 

View solution in original post

MJ2019
Level: Powered On

Re: Is PCF framework form aware?

Thanks @HemantG  for such quick response.

PaulMare
Level: Powered On

Re: Is PCF framework form aware?

@hemant I read point 4 as a readonly technique to find the controls available / used on the form...

Power Apps Staff HemantG
Power Apps Staff

Re: Is PCF framework form aware?

@PaulMare You mean using the server fetch for the XML and parsing on the client ? How will the formID be determined. Can you please elaborate ?

Power Apps Staff HemantG
Power Apps Staff

Re: Is PCF framework form aware?

HI Murtaza ,

In order to make the additional form fields availabel to the control, pleaes create additional input property to the control and configure it to the desired feild when adding the control to the form.

 

 

hemant 

PaulMare
Level: Powered On

Re: Is PCF framework form aware?

Ok, I was not thinking that as something to be done live - let me clarify, I understood the question as knowing which cutom controls are on a form, like in a technical documentation context. If that is a live requirement to have this information, I do not see a viable way - or a real business requirement. @murtuzab, let u know why the need might exist?

Power Apps Staff HemantG
Power Apps Staff

Re: Is PCF framework form aware?

Hi @PaulMare , my understanding was the same too :). Mustapha messaged me directly and looks like he is just looking for the value on the form. Let's wait to get it validated.

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,268)