@David1966 - one method is use a Variable.
For example, on the OnSelect property of your "Next" Button, enter:
UpdateContext(
{
_ctx_Index: If(
_ctx_Index <> 2000,
_ctx_Index + 1,
_ctx_Index
)
}
);
UpdateContext(
{
_ctx_record: Index(
'Your Data',
_ctx_Index
)
}
);
//the above assumes you have set an upper delegation limit of 2000 via settings
On the OnSelect property of your "Previous" Button, enter:
UpdateContext(
{
_ctx_Index: If(
_ctx_Index <> 1,
_ctx_Index - 1,
_ctx_Index
)
}
);
UpdateContext(
{
_ctx_record: Index(
'Your Data',
_ctx_Index
)
}
);
On the OnVisible property of the Screen where the Edit Form Control is located, enter the below to reset the Context Variable back to 1.
UpdateContext({_ctx_Index: 1});
On the Item property of your Edit Form control, enter:
_ctx_record
Notes:
- As you might have guessed, the Index function is not delegable. The maximum upper bound is 2000.
- There is currently not an out of the box way to Index a data source without using a workaround such as a creating a Collection with an index included. As a result, if you attempt for example to select an Item from the Gallery, the context variable in the Form Screen will not update itself with the Index number of that selected item. There is of course a solution to this as well if you need it, but for now I have provided a basic example above.