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 / Layout using Gallery
Power Apps
Unanswered

Layout using Gallery

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I want to capture 10 items (beds) in a horizontal gallery (2 row by 5 column), with a specific layout eg beds 1-5 are in row 1, beds 6-10 are in row 2

People can be placed in any bed (eg bed 1 and 7 can have patients and the rest are empty) in a non sequential order. However, i'm finding that gallery will automatically place patient beds in any order. 

How do i format the gallery to link a specific gallery space with only a specific bed number. Eg i'd like spaces to be blank if there is no one in the bed, and for patients in bed 5 to only show in the space where bed 5 should be 

 

Cheers

Categories:
  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    Do you want to sort the gallery items by bed number? If so , you could set the gallery's items property to:

    Sort(
     DataSource,
     BedNumber
    )

     

    Best Regards,

    Bof

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Yes, in a way. 

    I'd want the gallery to have 10 areas to show 10 items. If there's no patient in a bed, then there technically is no item coming in from the data source

    I'd like it to show:

    | Bed 1 | Bed 2 | Bed 3 |

    If there's no patient in bed 2, then there technically is no data coming in for bed 2 to show as an item. The gallery will only show it as: | Bed 1 | Bed 3 |
    Is there a way to placemark/reserve the spot where bed 2 is meant to be when there is no patient?

     

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    You could set the gallery 's items property to 

    ForAll(Sequence(10,1,1),{Title:"Bed "&Value})

    And in the gallery , you could use this formula to get data

    LookUp(SharePointList,Title=ThisItem.Title).ColumnName

     

    Best Regards,

    Bof

  • vaubeee Profile Picture
    533 on at

    Sorting is already covered by @Anonymous 
    Regarding the blanks you could use a toogle and labels visible property with if toggle false Unbenannt.PNGto cover the item

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    (use the same background color as gallery to make the cover invisble)

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Trying to give that formula a try. Having problem with the for all section

    What Am i meant to do for this part of the formula {Title: "Bed " &Value}

     

    Currently I've got Sort(AUData, 'Query[CurrentBed]') ; ForAll(Sequence(10,1,1),

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    Just set the Gallery's Items property to:

    ForAll(Sequence(10,1,1),{Title:"Bed "&Value})

    With out

    Sort(AUData, 'Query[CurrentBed]') 

     

    If you want to show show something like username in the gallery, you could add a label control into the gallery and set it's text property to:

    LookUp(
     AUData,
     'Query[CurrentBed]'=ThisItem.Title
    ).username

     

    Best Regards,

    Bof

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Power1231_0-1689925544352.png

     

    Set the gallery item to ForAll(Sequence10,1,1), {Title:"Bed " &Value})

     

    In label control, under text property i've typed that but theres no data showing

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    Could you please show me the value of

    First(Sort(AUData, 'Query[CurrentBed]')).'Query[CurrentBed]'

     

    Best Regards,

    Bof

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 405 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard