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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Embedded canvas app un...
Power Apps
Unanswered

Embedded canvas app unstable

(0) ShareShare
ReportReport
Posted on by 396

Hi,

 

I have been building an embedded Canvas app which works just fine in preview, but when I publish and check it inside my model driven app it doesn't work as expected.

 

So first of all the modeldrivenformintegration doesn't work when the app loads, so I had to add a timer and wait for a few seconds before I try to access it (even 3 seconds is not always enough, quite inconsistent).

My combobox onChange method used to work, now that I made the app heavier with features that doesn't touch that specific data it stopped working for some reason.

Atlast my button to update data selected inside my comboxes no longer responds (it doesn't even execute the onSelect method), as I added a simple variable to tell me "Clicked button" which doesn't work.

But if I test using the preview function everything works as it should.

Any ideas what is going on, and what I can do to ensure everything works as intended?

Thanks in advance!

Categories:
I have the same question (0)
  • Ami K Profile Picture
    15,679 Super User 2024 Season 1 on at

    Hi @Billy_C - it is hard to understand the problem because your post seems to randomly jump from one topic to another.

     

    Is your canvas app just not rendering at all when viewing from the model driven app? Is there an error message?

  • Billy Profile Picture
    396 on at

    Hi @Amik ,

    The canvas app does render inside my model driven app, it's just that loading the data doesn't always work because the model driven form integration doesn't have the data when it appears. That's why I had to add a timer, and even then it still doesn't always work.

    Not only that, but also certain functionality of the canvas app doesn't work in the model driven form, but it does inside the app studio preview mode.

    There are no error messages, nor in app studio, nor in the model driven form.

    Is it possible that certain functions don't work for embedded canvas apps?


    Any ideas?

     

    Thanks in advance!

  • Ami K Profile Picture
    15,679 Super User 2024 Season 1 on at

    There are certainly limitations but none that I am aware of for specific controls or functions.

     

    Please try these checks based on my experience with embedded canvas apps:

     

    • Ensure you have a single embedded canvas app for each form tab.

    • When adding an embedded canvas app to a model-driven form, always use a required column that is guaranteed to have a value. If your column does not have a value, your embedded canvas app will not refresh in response to any change in data on the host model-driven form.

    • Remember that publishing a model-driven form does not also publish the embedded canvas app. Embedded canvas apps must be published independent of the host model-driven form.

    • Embedded canvas apps are not displayed when creating a new row since they need a row context to be passed to them. This means embedded canvas apps do not work for new forms.

    • Keep removing fields from the form until the error no longer appears to pinpoint what field is causing the problem. This occurred for me once due a choice column. I removed the column from the canvas app form, saved and published, and then added the field in later. This resolved the problem.

    • Check the Data Source in the Form property is returning your table/entity, and the Item property in your Form is returning ModelDrivenFormIntegration.Item

    • In field properties window in classic mode, check the App ID and App Name is the same as the App ID and App Name for your App. For whatever reason in the past, when I checked the App ID and App name by looking at the canvas app properties, they were different from what detailed in the field properties property window. After changing these manually in the field properties window, the embedded canvas form loaded without issue. It is not clear to me why this happened in the first place but it is worth checking

     

    Picture1.png

     

    ------------------------------------------------------------------------------------------------------------------------------

     

     If I have answered your question, please mark your post as Solved.

    If you like my response, please give it a Thumbs Up.

  • Billy Profile Picture
    396 on at

    Hi @Amik,

    Thank you for the multiple tips, but I can confirm that none of them worked.

    • I only have 1 embedded canvas app
    • the column is the ticket number, which is a generated ID, hence it's never empty.
    • I published the canvas app from the canvas app studio itself and can confirm that if I published, the changes appeared in the model driven form.
    • Tests were done on an existing record
    • I didn't remove anything, cause as I mentioned NO ERRORS are being displayed
    • I can confirm that the data source is set up correctly and the integration does receive data
    • and the app ID and name are both correct, no issues there

    Now I said that the integration does receive data, but that's only if I add a timer and retrieve its data 5 seconds later, otherwise the data doesn't exist yet as the integration is probably still retrieving the data. (So far I had 0 instances where it still didn't have any data)

     

    The other issue which caused my button to stop working was apparently that the ForAll function isn't supported inside the embedded canvas app. Removing the function and creating a different layout as a workaround, so I don't need to use the ForAll function, seemed to have solved the issue.

    Although I must that this is annoying as hell since the app studio doesn't notify you of such functions not working when used in an embedded canvas app.

    So I am hoping that this is the only function at the moment.

     

    Nonetheless, thank you for the help!

     

    Kind regards,

     

    Billy

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard