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

How to Set ModelDrivenFormIntegration control's ItemID to variable in Embedding Canvas Application

Hello All,

 

I have created a canvas application and embedded it on Account Form. I used [@Accounts] as a DataSource to ModelDrivenFormIntegration control. I am trying to set ModelDrivenFormIntegration item's ID (accountid) as shown below:

Set(
        AccountID,
        [@ModelDrivenFormIntegration].Item.Account
);


If I run the application in edit mode then it's able to set value in AccountID variable but when I publish and run that embedded canvas application on Account form then its unable to set "AccountID" value (its showing blank).


How can I set the ModelDrivenFormIntegration control's ItemID to variable in embedded canvas application?

 

Can you please give me suggestion to resolve this issue?

 

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @v-xiaochen-msft ,

 

Thank you for your response. The issue is resolved now.

Actually on the OnStart of my application the ModelDrivenFormIntegration object is not yet filled it takes little bit time to load the data in ModelDrivenFormIntegration control. So, now I am checking IsBlank([@ModelDrivenFormIntegration].Item) condition to load data and its working fine now.

 

Thank you

View solution in original post

3 REPLIES 3
v-xiaochen-msft
Community Support
Community Support

Hi @Aish1 ,

 

I did a test but I can't reproduce your problem. It worked on my side.

Could you provide some screenshots?

 

Besides, here is the guidance on embedding canvas apps in MDA.

https://docs.microsoft.com/en-us/powerapps/maker/model-driven-apps/embedded-canvas-app-guidelines

 

Best Regards,

Wearsky

Hi @v-xiaochen-msft ,

 

Thank you for your response. The issue is resolved now.

Actually on the OnStart of my application the ModelDrivenFormIntegration object is not yet filled it takes little bit time to load the data in ModelDrivenFormIntegration control. So, now I am checking IsBlank([@ModelDrivenFormIntegration].Item) condition to load data and its working fine now.

 

Thank you

v-xiaochen-msft
Community Support
Community Support

Hi @Aish1 ,

 

Glad to see you solved the problem.

You are right. ModelDrivenFormIntegration object is loaded asynchronously.

You could mark yourself as a solution to close the case.

 

Best Regards,

Wearsky

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Ideas

Check out the New Ideas Site

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (3,618)