Hello,
I have a PCF where I've configured the a parameter in the manifest. See the attachment entitled pcf_input_parameter_config.PNG
When placing the PCF on a form, I have provided a value. See the attachment called pcf_set_input_param.jpg
The PCF has been used in 2 different ways:
Is it possible to have a defined 'input' PCF property, when the PCF is placed on a view and loaded through navigation (i.e. the 2nd way mentioned above)?
Thank you!
One more thing. When I tried to reset my Editable_App_Flag on the component within the view, I see the following message:
"There are no table columns associated with the selected table available for this property."
See screenshot (note: I have edited the image to hide private information). This parameter's usage is input, not bound. I was able to save it on the component associated with the view before, but when I tried again, I saw this. Is it not possible to have an 'input' parameter for a component within a view?
Hi Allan,
Thank you for your response.
For 1. when you mention: "Implement logic in your PCF control to wait for these properties to be assigned before use", if I do something like this:
if (component.context.parameters.isEditable!==undefined) {
console.log('************ isEditable', isEditable);
return getSubjectTree();
} else {
console.log('isEditable is undefined');
return <></>;
}
The component always enters the else of the clause above (i.e. I see 'isEditable is undefined' in the console output), and an empty component tag <></> is returned. Can you clarify what you mean by waiting for these properties to be assigned? Thank you!
Hello,
Yes, it's possible to ensure defined input properties for your PCF control when placed on a view and loaded through navigation in Power Apps. The issue with the isEditable property appearing undefined is likely due to how Power Apps handles property initialization in different contexts.
To address this:
Asynchronous Property Assignment: Handle scenarios where properties like isEditable might be undefined initially. Implement logic in your PCF control to wait for these properties to be assigned before use.
Use Lifecycle Events: Utilize PCF lifecycle events such as init or updateView to capture changes in property values and ensure consistent behavior across placements.
Testing and Debugging: Test thoroughly in both form and view placements to identify when and how properties are assigned. Use debugging tools to trace property flow and address any issues.
By managing property assignment timing and using lifecycle events effectively, you can maintain reliable behavior for your PCF control across different usage scenarios in Power Apps.
WarrenBelz
637
Most Valuable Professional
stampcoin
570
Super User 2025 Season 2
Power Apps 1919
473