cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Post Prodigy
Post Prodigy

Setting Dynamic Wrap Count

Hello Everyone,

 

I have a gallery which shows some laptop models filtered out according to their respective Manufacturer.

 

I want to make the wrap count dynamic like that if 1 manufacture have 5+ laptops then they show in two rows

otherwise in one row ( like Wrap count 2 for 5+ laptops and wrap count 1 for <5 laptops).

 

How can I achieve this, I have an excel file for All Manufacturers and their respective laptops or Devices associated with a manufacture ID.

 

For Example : Look at the screenShots

Asus : Manufacturer, Filters 5+ Laptops and I have set the Wrap count of the whole gallery to 2.

but for

Microsoft : Manufacturer, Filters only 4 Laptops and I want to set them in a  single row.

 

How can I set this dynamic wrap count

 

Kindly Advise

 

@amitchandak Asus1.jpgAsus2.jpgMicrosoft 1.jpgMsoft 2.jpg

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: Setting Dynamic Wrap Count

Hi @MH3 ,

If for example the width of the form is 720 pixels and you want to display three icons across, you would set a Variable (I will call it vWidth) to 240 with the Width of all the cards set to vWidth. If you want five across, 144, four 180 and so on. 

You would need to know how many were going to be displayed - one way would be to do a collection and a CountRows on this CountRows(CollectionName.AllItems), then work out some rules on how you wanted it displayed.

This is not a straight-forward exercise and as I mentioned, not something I believe was designed to happen.

If you want some deeper reading please refer to this article on Responsive Layouts.

 

Please click Accept as solution 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 giving it Thumbs Up.

View solution in original post

3 REPLIES 3
Highlighted
Super User III
Super User III

Re: Setting Dynamic Wrap Count

Hi @MH3 ,

I will try to point you in the direction of where I believe you need to go, but there may be unpredictable behavior as I don't think the forms were designed with this in mind.

 Firstly, you will need to set the column numbers to the highest amount likely. You then have the width of the cards which can be dynamic and once the total width of the row is reached, they will wrap. So you will need to do some mathematics on how many items are to be displayed and set the card widths (you can use a Variable that can be common to all) to fit the number you want across the screen.

 

Please click Accept as solution 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 giving it Thumbs Up.

Highlighted
Post Prodigy
Post Prodigy

Re: Setting Dynamic Wrap Count

I couldn't do what you said,

 

I need some kinda formula to that wrap count dynamic? 

 

is there anything

 

@WarrenBelz 

Highlighted
Super User III
Super User III

Re: Setting Dynamic Wrap Count

Hi @MH3 ,

If for example the width of the form is 720 pixels and you want to display three icons across, you would set a Variable (I will call it vWidth) to 240 with the Width of all the cards set to vWidth. If you want five across, 144, four 180 and so on. 

You would need to know how many were going to be displayed - one way would be to do a collection and a CountRows on this CountRows(CollectionName.AllItems), then work out some rules on how you wanted it displayed.

This is not a straight-forward exercise and as I mentioned, not something I believe was designed to happen.

If you want some deeper reading please refer to this article on Responsive Layouts.

 

Please click Accept as solution 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 giving it Thumbs Up.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (5,059)