Screen Starts vs Screen Opens

There’s a new option for screen element.
We can now select “When Screen Starts” or “When Screen Opens”.
What’s the difference?

As far as I understand, the Start block works only when the screen is created and initially displayed, and the Open block - every time the screen is displayed. For example, when you return to a previously opened page using the swipe gesture, the Start block is not executed, and the Open block is executed.

In the Start block, the initialization code is placed, and in the Open block, the code that you want to execute each time you return to this screen.

7 Likes

Try the project for your experiments with blocks.

https://x.thunkable.com/projects/5b1fa047c1b0c8cb896dfa10/project/properties/designer/

1 Like

This is correct – thanks for the explanation!

Albert

2 Likes

I made an improvement project. Now you can see when the Starts and Opens blocks work. You need to understand how navigation works in the following cases:

  1. The navigation components are not used. Only “navigate to” blocks are used.
  2. Navigation components are used alone or together with blocks “navigate to”.
  3. Some screen is located outside the navigation component
  4. The screens are located in different navigation components
  5. Swipe-gesture enabled or disabled

https://x.thunkable.com/projects/5b1fa047c1b0c8cb896dfa10/project/properties/designer/

Is there any way that action to return to a particular screen can be captured.

In my App, I wish the user to browse Youtube Videos in a webviewer in screen ‘B’ and select a particular video the link of that video should be captured and automatically uploaded to textbox in a previous screen once the user returns to the previous screen ‘A’.
Is it possible?
How?

Hey @firecoder, welcome to the community and thanks for posting! :wave:

Thunkable apps do not have the ability to grab the current URL (yet) but according to the Thunkable Github, this is a feature being considered currently!

From discussions in the community, I came to understand that Webviewer uses iframe for displaying websites. So, as long as the websites are being displayed the web viewer is getting an ip address. It is also evident from the fact that I can copy the link manually by clicking and copying over the link on webviewer. Since the ip address is being captured in the iframe instead of the page of webviewer, it is not possible to capture it from page’s URL. But, If we can access the iframe through coding we can capture the current ip being displayed in that iframe from **<iframe src=" *URL* "></iframe>**. Any idea how iframe of web viewer can be captured?