Links

Control Blocks

Overview

The control blocks are code blocks or segments that control the flow of the app. These blocks are used to manage the order in which different parts of the code execute. They typically include structures like conditionals and loops, which help determine when certain actions or commands should be carried out based on specific conditions.
The "navigate to screen" block takes the user to the defined screen.

Video Tutorial

How to Change Thunkable Screens with a Button Click

In this tutorial, you’ll learn how to use the "navigate to screen" block to allow your app’s users to navigate between app screens with a simple button click.

If, Do and If, Do, Else

The "if, do" and "if, do, else" blocks allow you to make decisions in your app. They execute certain actions if a condition is true and different actions if the condition is false.
To transform the "if, do" block to support more complex logic:
  1. 1.
    Click the block's purple gear icon.
  2. 2.
    Drag "else if" and "else" blocks under the "if" block.
  3. 3.
    Click the block's purple gear icon again.

Wait [1] Seconds

Wait the specified amount of time before performing the next action.

Loops Blocks

Loop control blocks allow you to execute a set of commands multiple times. They are helpful for tasks that need to be repeated, such as iterating through a list of items.

Forever

Repeat the action for an unlimited period.

Repeat [10] Times

Repeat the action the specified number of times.

Count with i from [1] to [10] by [1]

Repeat the action a specified number of times with the incrementer index i.

For Each Item j in List

Repeat the action over every item in a list.

Repeat While

Repeat the action while a condition is true.

Break out of Loop

Break out of an existing loop.

Test, If True, If False

This block can return a value based on a given condition. If the condition is true, one value is returned. If the condition is false, a different value is returned.
The "open link" block opens an installed app or a URL in the device's browser. If the device has the relevant app installed, the link will open in the app. Otherwise, the link will open in the browser.