web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Gallery icon position
Power Apps
Answered

Gallery icon position

(0) ShareShare
ReportReport
Posted on by 36

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!

Categories:
I have the same question (0)
  • Verified answer
    RezaDorrani Profile Picture
    12,143 on at

    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-collection/td-p/339716

     

    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

     

     

  • v-xida-msft Profile Picture
    on at

    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,

  • JuliL Profile Picture
    36 on at

    @RezaDorrani  Thank you it worked!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard