web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : 5py1c4u5PCmC2nnQ6FrEQ6
Power Apps - Microsoft Dataverse
Unanswered

PCF input parameter is undefined when placed on a view that is loaded through the navigation menu

Like (0) ShareShare
ReportReport
Posted on 28 Jun 2024 21:30:57 by 32

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:

  1. Placed on a form. When this form is loaded by clicking a record in a view the property isEditable has a defined value (i.e. true or false) 😀
  2. Placed on a view. This view is loaded through the navigation. Unfortunately the property isEditable always seems to be undefined in this case.  😒

 

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!

Categories:
  • akatakkar Profile Picture
    32 on 02 Jul 2024 at 18:41:58
    Re: PCF input parameter is undefined when placed on a view that is loaded through the navigation menu

    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?

     

     

  • akatakkar Profile Picture
    32 on 02 Jul 2024 at 14:59:10
    Re: PCF input parameter is undefined when placed on a view that is loaded through the navigation menu

    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!

     

     

     

  • AllanDeCastro Profile Picture
    412 Most Valuable Professional on 30 Jun 2024 at 22:13:15
    Re: PCF input parameter is undefined when placed on a view that is loaded through the navigation menu

    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:

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

    2. Use Lifecycle Events: Utilize PCF lifecycle events such as init or updateView to capture changes in property values and ensure consistent behavior across placements.

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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473

Featured topics

Loading complete