Hi @stapes ,
Could you please share a bit more about the data structure of your PhotoImages?
Is there a "Row Index" column existed in your PhotoImages data source?
Based on the needs that you mentioned, I afraid that there is no direct way to achieve your needs in PowerApps currently. As an available solution, you could consider add a "Row Index" column in your PhotoImages data source as index number, e.g. 1, 2, 3, 4, ...
If you want to add a "Row Index" column in your PhotoImages data source, please consider take a try with the following workaround:
Set the OnStart property of App to following:
Clear(PhotoImagesCollection);
ForAll(
PhotoImages,
Collect(
PhotoImagesCollection,
{
RowIndex: CountRows(PhotoImagesCollection) + 1,
Column1: PhotoImages[@Column1],
Column2: PhotoImages[@Column2],
Column3: PhotoImages[@Column3],
...
}
)
)
Then set the Items property of the image Gallery (Gallery2) to following:
PhotoImagesCollection
Then modify your Navigation formula as below:
Navigate(Screen4, None);Set(SelectedRowIndex, Gallery2.Selected.RowIndex)
Within your Next screen, you could reference the selected image data from your Gallery2 using the following formula:
LookUp(PhotoImagesCollection, RowIndex = SelectedRowIndex).ImageDataColumn
Set the OnSelect property of the "Next" button to following:
Set(SelectedRowIndex, SelectedRowIndex + 1)
Set the DisplayMode property of the "Next" button to following:
If(
SelectedRowIndex + 1 > Max(PhotoImagesCollection, RowIndex),
DisplayMode.Disabled,
DisplayMode.Edit
)
Set the OnSelect property of the "Previous" button to following:
Set(SelectedRowIndex, SelectedRowIndex - 1)
Set the DisplayMode property of the "Previous" button to following:
If(
SelectedRowIndex - 1 < Min(PhotoImagesCollection, RowIndex),
DisplayMode.Disabled,
DisplayMode.Edit
)
Please consider take a try with above solution, then check if the issue is solved.
Best regards,