Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

Specify number of gallery items per wrap

(1) ShareShare
ReportReport
Posted on by 186

Background:

I have a collection of approval information displayed in a horizontal gallery. This is the schema of the collection:

 

 

 

[
 {
 ApprovalCompletedDate: DateTime,
 ApprovalIndex: Number,
 ApprovalStatus: Text,
 ApproverComment: Text,
 ApproverName: Text,
 ApproverPhoto: Image,
 ApproverTitle: Text
 }
]

 

 

 

 

 

Data in the collection might look something like this:

lkaspar_2-1660700141914.png

 

The gallery structure looks like this:

lkaspar_1-1660702959529.png

 

I then display it in a horizontal gallery like so:

lkaspar_0-1660785369268.png

 

 

 

This works well for one group of approval information. 

 

Requirements:

Sometimes there are multiple groups of approval information. This can happen when an approver rejects an approval request and the item gets re-submitted for approval. This will create new approval entries. Each approval group can be identified by their Group ID. There can be be 1 or many approval groups. In the current design I only display entries in the most recent Group ID, for example using the data from the screenshot the user would see information form entries 24766, 24767, and 24768 only.

 

lkaspar_4-1660701242333.png

 

Problem

 

I've modified the schema of the collection to also include `Group ID`. The question is how to display the different groups in the horizontal gallery.

 

I could display all records in the one row and use a different background colours / headings for each group id. I think that is too messy and would cause confusion.

 

I would prefer to have each approval group on separate rows. I can get the WrapCount by counting the number of distinct Group ID. However, I need to be able to specify that all records with the same Group ID go on the same row. There could be different numbers of items per Group ID.

 

Below screenshot is what the end result should look like. A WrapCount of 3. Row 1 has 3 items, row 2 has 2 items and row 3 has 3 items.

 

Anyone have any ideas how to approach this?

 

lkaspar_1-1660783345850.png

 

Categories:
  • JR-BejeweledOne Profile Picture
    JR-BejeweledOne 5,836 on at
    Re: Specify number of gallery items per wrap

    I wish I had other suggestions for you, but the wrap count is for the overall container and doesn't allow for what you are trying to do.

  • lukas.schauffele Profile Picture
    lukas.schauffele 186 on at
    Re: Specify number of gallery items per wrap

    Hi @JR-BejeweledOne - thanks for your input.

     

    I see two problems with using individual galleries:

     

    1. I don't know how many group ids there are. Could be one, could be five. I would need to cater for say a maximum of five and then only display the ones that are needed.

    2. Performance + Design. The structure of each gallery would be identical. I would be copying and pasting the same gallery components. This makes it error prone to maintain and update and adversely affects performance.

  • JR-BejeweledOne Profile Picture
    JR-BejeweledOne 5,836 on at
    Re: Specify number of gallery items per wrap

    I am not sure it can be done as the wrap count is for the overall container.   Have you considered using individual galleries for each groupID?

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,636

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,942

Leaderboard