Hi,
I need to add an index column to a collection so my in my gallery an item can look into the previous item to hide data if it is the same.
I found this code somwhere here which works but on revieweing the speed of the process that builds the collection this step appears to be incredibly slow (3 seconds for 40 items, a bit less than half the total process that involves getting data from dataverse and sql tables). I don't know why it is is so slow but might someone now a quicker way?
;;ForAll(
Collection1
;Collect(Collection2;
Last(FirstN(AddColumns(Collection1;
"SortNr";
CountRows(Collection2)+1
);
CountRows(Collection2)+1
)
)
)
)