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 / Query the information ...
Power Apps
Answered

Query the information for Gallery component

(0) ShareShare
ReportReport
Posted on by 64
Hi 
 
For our development , we use the Gallery and there is Label in This Gallery. And there is a logic outside the Gallery, 
 
 
 
However outside the Gallery, there is a logic check this label. Seem the label out side the Gallery is blank
 
But inside the Gallery , it show the value is as below
 
May i know this if the Label value outside the Gallery will select a random value or not?
Categories:
I have the same question (0)
  • Verified answer
    Vish WR Profile Picture
    3,748 on at
     
     
     
    ErrorMessageSchedule.Text (outside GallerySchedule) returns Blank, while the per-row label inside the gallery correctly shows "WARN: Planned DEV Start Date should be future day".
     
    Reason
     
    The outside label's formula likely references a gallery-template control (e.g. LabelScheduleGalStatus.Text) directly. Controls inside a gallery template only exist per row — there's no row context outside the gallery, so the reference resolves to Blank.
     
    Fix
     
    Capture the warning into a collection
     
    Inside the gallery row (e.g. in the per-row label's OnChange, or in your existing batch update logic), push the warning text into a collection:
     
    powerfxCollect(colScheduleWarnings, {Item: ThisItem.ID, WarnText: LabelScheduleGalStatus.Text})
     
    (If you already maintain colScheduleGal, add a WarnText column there instead of a new collection.)
     
    Update ErrorMessageSchedule.Text formula
     
    Replace the current formula with:
     
    powerfxFirst(Filter(colScheduleGal, StartsWith(WarnText,"WARN:") || StartsWith(WarnText,"ERR:"))).WarnText
     
    Default value
     
    Wrap with IfError/Coalesce to avoid blank-on-no-match:
     
    powerfxCoalesce(
    First(Filter(colScheduleGal, StartsWith(WarnText,"WARN:") || StartsWith(WarnText,"ERR:"))).WarnText,
    ""
    )
      Vishnu WR
     
    Please âœ… Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like â™¥
     
     
     
  • Kushal_M Profile Picture
    296 Super User 2026 Season 1 on at
    Hello @samxu,
     
    No, the label outside the Gallery will not automatically pick a random row’s value—a control inside a gallery exists once per row, so from outside the gallery there is no row context, and referencing that child label directly usually returns Blank. In Power Apps, a Gallery has its own scope, and child controls are repeated for each item; therefore LabelInsideGallery.Text from outside the gallery refers to the template, not a specific rendered row value. If you want one value outside the gallery, use the selected record instead, for example based on GalleryName.Selected.<ColumnName> rather than the inner label control text.  If the text is calculated only inside the label, store that result in a variable or collection when the user selects/changes a row, then bind the outside label to that stored value.  So the behavior you see is expected, not random: inside the gallery the label has ThisItem context, but outside the gallery it does not, so it shows blank unless you explicitly pass/select the row value.
  • Vish WR Profile Picture
    3,748 on at
     
     
    Wanted to check if you were able to resolve your issue?
     
    Please âœ… Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like â™¥
    Visit my blog My Tech Space    LinkedIn  

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard