cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
iamsujith
Frequent Visitor

Positioning issues with handling multiple Galleries?

I am building a PowerApp that shows a Selection Summary( A compilation of multiple galleries of selected items within the PowerApp). Users can select upto 8 different selections ( 8 Galleries of selected items). Here's a screengrab when 8 Galleries are displayed at the same time.

The 'Visible' Property of each of the Galleries shown in the picture above depends on the value of a Global Variable associated with the Selection. For instance, Gallery with the label 'Mobile Plan Selection 1'will be visible only if its associated Global Variable value equals the following (CountMP=1).
Customized Selections (8 Galleries) within the appCustomized Selections (8 Galleries) within the app
Following this method causes 'Positioning issues' when certain selections are removed after customization. If the user removes a few selections from what's shown above, the screen looks like this.

Selection Summary showing 4 GalleriesSelection Summary showing 4 Galleries

How do I go about reordering the coordinates of these Galleries if some of the other galleries are not displayed?

For instance, if there are four random selections selected, then the Galleries should fit nicely in the screen in the space of the first four selections.

(I was thinking about using nested IF statements to fix this issue, but I wasn't too sure if that's the right method)

Can someone please help me with this issue? Any help would be massively appreciated.

2 REPLIES 2
v-yutliu-msft
Community Support
Community Support

Hi @iamsujith ,

Do you want gallery to automatically resize and position?

I‘ve made a similar test as follows:

Create three galleries on one screen

Set gallery1’s height:

If(Gallery3.Visible&&Gallery5.Visible,100,If(Gallery3.Visible||Gallery5.Visible,400,800))

Then,gallery1’s height will automatically adjust according to galledy3 and gallery5’s visible.The specific value needs to be set by yourself.You can also set the gallery’s width and X/Y.

If you want more intelligent resizing and positioning, I suggest you express your views on PowerApps Ideas Forum.Your precious advice will be very helpful for our work.

https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

 

 

Best regards,

Community Support Team _ Phoebe Liu

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-yutliu-msft ,

Thanks for taking your time to respond to my query. Nested if statements do not seem to do the trick for me because of the fact that every selection in my app (Mobile Plan Selection 1,2 and so on) shows data from multiple Galleries (around 5-6 ) and not from a single Gallery.

Please see the Tree View of the multiple Galleries(highlighted) for one of the selections (Mobile Plan Selection 1).

 

Tree View of the grpMP1 that shows data collated from multiple galleries for Mobile Plan Selection 1Tree View of the grpMP1 that shows data collated from multiple galleries for Mobile Plan Selection 1

I liked the nested if statements and due to the fact that my data comes from multiple galleries, I had to apply the logic to every single gallery in this group (For instance, grpMP1 and grpMP2 has 5 Galleries and therefore I had to apply the nested if logic for every gallery in grpMP2 to position grpMP1 correctly if the former is not visible). 

The app currently can show around 11 Selections and therefore has around 55 Galleries(11x5 Galleries =55 Galleries) and I think applying the same logic is going to take a lot of time. 

Should I look into collating data from these multiple galleries into one collection and then look into applying the same logic again?

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (5,651)