Hello,
when I navigate to a screen (say SCR1) for the first time, PowerApps shows the screen at its top position. If I scrolll down, go to another screen, and then come back to SCR1, it shows the screen at the last position used (so down part in that case).
Whereas I would like it to always display the screen at the top.
Is there any way to achieve this ?
Guillaume
Solved! Go to Solution.
@Anonymous
So workaround to this is to add in your screen where the canvas is in OnVisible property
UpdateContext({resetCan:false})
and in OnHiden property
UpdateContext({resetCan:true})
Then in your DataCard Visible property set
resetCan=false
That will reset the datacard and move the canvas at the top when you navigate to the screen
Yes. It is almost the same workaround. All you have to do is reset the items in the gallery. Do exactly the same thing with OnVisible and OnHiden property of the screen and and in your gallery Items property add
If(resetCan=false, [your original items here])
Hello,
it is a scrollable canvas on the screen (with one card only), how do I get to the top ?
Thanks
Ok, here is a screenshot :
As you can see on the left, there is one canvas in my screen, with one data card that contains all the elements. Below is the down part of the screen.
Guillaume,
I have seen several post related to the scroll bar not resetting to the top upon arrival to a screen. To the best of my recollection, there is currently not a solution for this. There needs to be a property associated with the scroll bar that allows the scroll bar to be reset to top if true. It becomes confusing to users to navigate to a screen and then try to figure out where they are because the scroll bar is scrolled to the bottom, etc.
@Anonymous
So workaround to this is to add in your screen where the canvas is in OnVisible property
UpdateContext({resetCan:false})
and in OnHiden property
UpdateContext({resetCan:true})
Then in your DataCard Visible property set
resetCan=false
That will reset the datacard and move the canvas at the top when you navigate to the screen
Thanks @Sienna, it worked ! Though it adds a little delay when displaying the screen, but it works 🙂
To be precise, I modified the OnHidden & OnVisible properties of the screen, not of the canvas (these properties exist only for screens anyway)
User | Count |
---|---|
157 | |
93 | |
78 | |
73 | |
57 |
User | Count |
---|---|
202 | |
166 | |
98 | |
94 | |
79 |