cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
julilis
Level: Powered On

Gallery icon position

Hello everyone,
I am wondering if it is possible in each record to change the position of the icon.
For example, in the first record the icon is on the left side, and in the second record the icon is on the right side and the third record on the left again.

 

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: Gallery icon position

Hi @julilis 

 

It is possible but you will have to create an index field for each row in the gallery

Check this post on how to do this

https://powerusers.microsoft.com/t5/General-Discussion/Patching-an-item-index-number-into-a-collecti...

 

You can then set the X property of the icon based on index value 

example : If(Mod(ThisItem.Index,2)=0,40,100)

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

 

View solution in original post

3 REPLIES 3
Dual Super User
Dual Super User

Re: Gallery icon position

Hi @julilis 

 

It is possible but you will have to create an index field for each row in the gallery

Check this post on how to do this

https://powerusers.microsoft.com/t5/General-Discussion/Patching-an-item-index-number-into-a-collecti...

 

You can then set the X property of the icon based on index value 

example : If(Mod(ThisItem.Index,2)=0,40,100)

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

 

View solution in original post

Community Support Team
Community Support Team

Re: Gallery icon position

HI @julilis ,

Which data source do you use within your app? A SP List?

Do you add a Row Index column within your SP List?

 

If the data source you used witin your app is a SP List, based on the needs that you mentioned, you could configure your app as below:6.JPG

Set the X property of the Icon in your Gallery to following formula:

If(
Mod(ThisItem.ID,2)=0,
Parent.TemplateWidth - NextArrow2.Width-5,
0
)

If the data source you used in your app does not contain a Row Index column, please consider add a Number column in your data source to store the Row Index firstly.

I have made a test on my side, please take a try with the following workaround:

Set the OnStart property of the App to following:

Clear(TempCollction);
ForAll(
           RenameColumns('YourDataSource', "PrimaryColumn", "PrimaryColumn1"),
           Collect(TempCollction, 1);
Patch('YourDataSource', LookUp('YourDataSource', PrimaryColumn = PrimaryColumn1), {IndexColumn: CountRows(TempCollction)}) )

Note: The IndexColumn represents the Number column in your data source, which used to store the row index value.

Set the Items property of the Gallery to following:

'YourDataSource'

Set the X property of the Icon in your Gallery to following formula:

If(
Mod(ThisItem.IndexColumn, 2)=0,
Parent.TemplateWidth - NextArrow2.Width-5,
0
)

 

Please take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
julilis
Level: Powered On

Re: Gallery icon position

@RezaDorrani  Thank you it worked!

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (8,085)