cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Allowing access to PCFControl instance from client API

Per forum thread https://powerusers.microsoft.com/t5/PowerApps-Component-Framework/Form-designer-setting-additional-m...

 

Basically, I am looking for scripting capability of PCFControls in forms. The solution can be just one extra method in the parent control instance to return the reference of the PCF.

If the PCF is

export class DogPCFControl implements ComponentFramework.StandardControl<IInputs, IOutputs> {
.. getOutPut(){
}
// additional custom method we'd like to expose to client
public bark():void {
  alert("woof");
}
}

in client API:

 

var ctrl = formContext.getControl ("someattribute");
if (ctrl.getControlType() == "customcontrol:MyNameSpace.DogPCFControl") {
    var mypcf= ctrl.getCustomControl(); // this is the asked feature, and can be generic enough with minimal API change
    mypcf.bark(); 
} 
Status: Declined

Client APIs for the control work irrespective of the PCF or the native PCF OOB control. We are looking into makeing the controls more expression aware and also add eventing in future. ClientAPIs support expansion is not planned at this point. 

 

Hemant

Comments
Power Apps
Status changed to: Declined

Client APIs for the control work irrespective of the PCF or the native PCF OOB control. We are looking into makeing the controls more expression aware and also add eventing in future. ClientAPIs support expansion is not planned at this point. 

 

Hemant