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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Nesting PCF inside fle...
Power Apps
Answered

Nesting PCF inside flexible gallery

(0) ShareShare
ReportReport
Posted on by 9

Hi everyone,

 

I create a PCF with generated HTML according to an input text as parameter. I have an output parameter how give me the height of the generated HTML. This output parameter is refreshed each time the input text changes. 

 

I'm looking to nest my PCF inside a flexible height gallery in order to have each row as height as my output height parameters. I use my output parameter to define the value of my PCF height property.

 

Actually, all the gallery row's are using the PCF output parameter of the first row. When I'm using my component outside the gallery everything work like a charm.

I presume their's some kind of refresh problem inside the gallery. Does anybody have ever faced this problem ? 

 

Thank you all.

colormeker.PNG
I have the same question (0)
  • cchannon Profile Picture
    4,702 Moderator on at

    The notifyoutputchanged event is referenceable in canvas app as <controlname>.output

     

    Make your heights (or anything else you want to be dynamic based upon PCF outputs) dependent on this, and you should be able to get the dynamic behavior you are looking for.

  • PunkyLama Profile Picture
    9 on at

    I've already set the notifyoutputchanged event. And it doesn't change anything, maybe I call wrongly the event ? 

    It's called in my updateView like this at the end :

    PunkyLama_0-1626687241564.png

    And in my getOutputs : 

    PunkyLama_1-1626687286809.png

    Like this I can use the reference in canvas app as you said, but it's return again the same value for each row. 

     

    P.S. When I open the Chrome DevTools my console give me 4 times the same height when I'm in looking the canvas app (In my test I have 4 rows).

     

     

  • Verified answer
    cchannon Profile Picture
    4,702 Moderator on at

    notifyoutputchanged doesn't itself change anything. It simply notifies the containing context (canvas app, in this case) that an updated value is available, and that context calls the getOutputs function in return.

     

    In your Canvas App, you then need to attach to this event, by associating the height of your gallery to <componentname>.output

     

    Separately from that, if you're getting the same values for each row, you should look at your HTML and ensure things like, "is that Id really unique?"

  • Verified answer
    aroudaki Profile Picture
    Microsoft Employee on at

    you need to give the div a unique id.

    this line will always return the first div with "DivOutput" id.

    aroudaki_0-1626710341000.png

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 541

#2
WarrenBelz Profile Picture

WarrenBelz 434 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 289

Last 30 days Overall leaderboard