cancel
Showing results for 
Search instead for 
Did you mean: 

Gallery Template - add rownumber parameter

In this way you can do a formula on for example the Fill property. Like 

If(Mod(ThisTemplate.RowCount)=1,
	DarkGray,
	White
)

This would make the first line darkgray, the second white, the third darkgray and so on.

 

Status: Under Review

Updating status and adding @GregLi

Comments
PowerApps Staff
Status changed to: Under Review

Updating status and adding @GregLi

Level 10

I would like this also. I just want to show the row number on the gallery so a user can know what row he is on. With the virtual scrolling a user has no idea how many rows he has to scroll thru . If I put the rowcount near the header aree of the page and the row # on the details of the gallery the user can know where he is.

Level: Powered On

Any updates on this?

Level: Power Up

Need it badly... Any news yet, please?

Level: Powered On

This is really needed - would be great for alternate shading of galleries and a whole bunch of other stuff.

Level: Powered On

My workaround for this was to generate row id's for my data source by placing them into collections. Once I have a row id on my collection, I can use that to my liking.

Code: 

//Clear final collection to ensure no redundant data
Clear(colWorkers);

//Create a temporary collection for data source
ClearCollect(tempColWorkers, Workers);

//This create a column called row id on your final collection
ForAll(tempColWorkers, 
    Collect(colWorkers, {
        rowid: CountRows(colWorkers)
        //Add your other columns here
    })
)

I placed that on my OnStart so this happens only when my app starts.

Also for the gallery template fill: 

If(Mod(rowid,2)=0, Color.Aqua, Color.AliceBlue)


Samples:

My Workaround.PNGresults.PNG