Hi,
I hope my message finds you well. I would love to create a simple scroll feature on my screen where I have three blocks.
The idea is to Navigate from screen A to screen B.
On screen B, depending on the input given (sent from screen A)...
if input = 1, scroll to Block num 1, if 2 scroll to block num 2 ...etc
Any ideas on how to apply this in the simplest way possible ?
Best regards,
Azhar
I leave here 1 solution.
Best regards.
Hi @Azhar Bondi ,You can use the ScrollToElement
Just provide name to every block like BlockOne etc then use name as widget.Id.At on ready pass the WidgetId to ScrollToElement based on the Input sent from screen A.
Regards
Krishnanand Pathak
Hi @Azhar Bondi ,
Find this post to similar question here is the details for it.
https://www.outsystems.com/forums/discussion/81361/dynamic-adding-content-scroll-automic-on-specific-content-when-user-click-from/
Hope this will help you.
Hi Azhar Bondi,
did you get a solution? Please update, we are going to help you.
Thanks,
Ramesh
Hi Ramesh,
thank you for your message. Not yet actually. Still figuring things out!
This is the test sample I am working on. Still not working !
Hi! Thank you Fábio !
I tried to apply it to the client's app and I followed exactly the same steps but this error message appears, do you have an idea what it could be about?
I used the debugger as well and the value is being read correctly... but the scroll doesn't work and the error message appears
Hello,
You set the name in the element you want scroll?
Yes Fábio ! The names are exactly the same
For those of you who had same error » for me it was solved when I used setTimeout.
If the scroll didn't work even when the error disappeared, check if your block Id matches when using inspect in the browser(for me it wasn't the case that's why it wasn't working ) so instead of working with Block Id, I added class name to each block container for better identification and i changed the js
from this :
to this:
Thank you @Fábio Vaz