How To Make View Pager Select The Page We Desired

Hello everyone, I am creating an app in which I store a tag /value using the tinydb and after that on the other screen i use the same stored tag to control one screen from another like this

Store Tag In 1st Screen

Use Stored Tag In Another Screen in the “when screen initialize” block

The tags are working fine (tested the stored tag with a notifier) but I want to make the view pager select the page which I stored in 1st screen I hope you’re getting what I want to say…

As per the screenshots above, I stored a tag named “agents” with value “Astra” and then used this tag in another screen to make the view pager select the page called “Astra” but its not selecting that page & other pages too, instead it shows me the default first page when screen initialize. Idk what blocks should I use to make the view pager select the page as per the stored value when screen starts so please help me out…

I can’t share the original AIA as its a big project which took me around 3 weeks to make it so I’m sharing a duplicate AIA with same blocks & components
kkkk.aia (350.3 KB)

test this

kkkk1.aia (350.8 KB)

Please do not spam the topic… pls search or create new one…

I hope it is due to more blocks/multiple components of same type/biggers asset/project within project

Thank You So Much!

1 Like

by the way one more question, what if I want to use clickable image instead of buttons then what changes should I make in these blocks in the first screen!
blocks

1 Like

Again Thank You So Much! :innocent: :blush:

bhai sorry to disturb you again but I tried using the blocks as mentioned above but its showing me some error

I used these blocks in the first screen

do I have to make changes in the blocks of the screen 2 as well?

kkkk2.aia (350.7 KB)

Sorry… That was my mistake…

Pls change these two variable positions

1 Like

It Worked! Thank You So Much For Helping Me Out Bhai, You’re Great! :innocent:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.