Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Gallery not populating consistently on embedded app load

(0) ShareShare
ReportReport
Posted on by 30

I have an embedded app which should load products based on the quote. ModelDrivenFormIntegration.DataSource = [@Quotes} 
I collect the price list items,  using the Price List from the quote.  I then associate the product name and unit name, to columns in the gallery since the Product and Unit are records.  I need the product name for a search feature. 

 

When testing the embedded app, the gallery is not loaded consistently.  If I navigate away from the page and return to the page using the Back() function, the galleries are populated.  Is there a setting I'm missing?  

 

Thanks in advance. 

Categories:
  • Verified answer
    semosby Profile Picture
    30 on at
    Re: Gallery not populating consistently on embedded app load

    I've added logic to display a loading spinner while the data is loading.  Form displays after load.  Not as consistent as I would hope, but it works most of the time.  

  • semosby Profile Picture
    30 on at
    Re: Gallery not populating consistently on embedded app load

    This is a canvas app embedded in a model driven app by way of control.  I followed the MS documentation.   I've attached the image.  The image shows the app after load.  The highlighted area is the result of this formula. 
    ModelDrivenFormIntegration.Item.Name & " "
    & Char(13) & CountA(galProducts.AllItems.Product.Product) & " galProducts"
    & Char(13) & CountA(listedProd.Product.Product) & " ListedProd"
    & Char(13) & CountA(ListProd.Product.Product) & " ListProd"
    & Char(13) & CountA(Productlist1.Product.Product) & " ProductList1"


    The quote name populates but the collections do not.   


    Here are the formulas to build the collections located in the on visible of the form.:

    Set(inItem,ModelDrivenFormIntegration);
    Set(inQuote,ModelDrivenFormIntegration.Item);
    Set(inQuoted,inQuote.'Price List');
    UpdateContext({openTimer:true});

    /* Get price list items from quote price list */
    ClearCollect(Productlist1,
    //Filter (
    Filter('Price List Items', 'Price List Items (Views)'.'PriceList Products'
    ,'Price List'.'Price List' = inQuote.'Price List')
    );


    ClearCollect(listedProd,
    Filter(Productlist1,'Price List'.'Price List' = inQuote.'Price List') );

    /* Add product name for search function */
    ClearCollect(ListProd,
    AddColumns(listedProd,"pName",Product.Name,"pUnits",Unit.Name,"pLevel",'Price List'.Name)
    );




     

  • a-ovbord Profile Picture
    on at
    Re: Gallery not populating consistently on embedded app load

    Hi @mosbySE,

     

    Just to understand your setup, do you have a model driven app and you're trying to embed a canvas app in it?

    Any chance you could add some pics with the controls and their properties of the gallery?

     

    I'm also going to add a doc on embedding canvas app in model driven apps, just in case you're doing this:

    https://docs.microsoft.com/en-us/powerapps/maker/model-driven-apps/embed-canvas-app-in-form

     

    Thank you,

    Ovidiu

     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard