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!
Solved! Go to Solution.
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
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
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
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
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:
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,
Check out new user group experience and if you are a leader please create your group
Did you miss the call?? Check out the Power Apps Community Call here!
See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.
User | Count |
---|---|
273 | |
257 | |
87 | |
39 | |
34 |
User | Count |
---|---|
348 | |
249 | |
130 | |
68 | |
48 |