333
Views
10
Comments
Solved
How to make the screen automatically scroll to a specific block?
Application Type
Reactive

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

2018-08-27 08-29-35
Fábio Vaz
Solution

Hi,

I leave here 1 solution.

Best regards.

TestScroll.oml
2023-04-16 15-25-31
Krishnanand Pathak

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





2026-02-26 06-29-24
Rahul
 
MVP
2025-10-18 11-13-53
Ramesh subramanian

Hi Azhar Bondi,

did you get a solution? Please update, we are going to help you.

Thanks,

Ramesh

2024-03-27 13-27-06
Azhar Bondi

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 !

Azhar


TestScroll.oml
2018-08-27 08-29-35
Fábio Vaz
Solution

Hi,

I leave here 1 solution.

Best regards.

TestScroll.oml
2024-03-27 13-27-06
Azhar Bondi

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


2018-08-27 08-29-35
Fábio Vaz

Hello,

You set the name in the element you want scroll?

2024-03-27 13-27-06
Azhar Bondi

Yes Fábio ! The names are exactly the same 

2024-03-27 13-27-06
Azhar Bondi

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:



2025-10-18 11-13-53
Ramesh subramanian

Thank you @Fábio Vaz



Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.