cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Regular Visitor

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

>>  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
Microsoft
Microsoft

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.

Thanks @PaulMare 

>>  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

Thanks @HemantG  for such quick response.

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

@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 ?

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 

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?

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
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Users online (50,478)