# Control

## Navigate to a Screen

You can manage much of your screen navigation through our [Top Tab](https://docs.thunkable.com/~/changes/wHhkjLVeheBnfbpghRnw/top-tab-navigator), [Bottom Tab](https://docs.thunkable.com/~/changes/wHhkjLVeheBnfbpghRnw/bottom-tab-navigator), [Drawer](https://docs.thunkable.com/~/changes/wHhkjLVeheBnfbpghRnw/drawer-navigator) and [Stack](https://docs.thunkable.com/~/changes/wHhkjLVeheBnfbpghRnw/broken-reference) navigator components but for simple screen navigation, you can use the very popular block below

![](https://1223006790-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LAn5scXl2uqUJUOqkJo%2F-MZBzZPrTxRQzECz6PHn%2F-MZBzgvTlN1eZtwwJ1k6%2FScreen%20Shot%202021-04-26%20at%208.04.10%20AM.png?alt=media\&token=00dcfbd4-2df6-4a30-a6ce-27a773f7dcab)

## If `this`, do `that`

![Simple if this, do that block](https://1223006790-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LAn5scXl2uqUJUOqkJo-84897653%2Fuploads%2Ft3no88s1Sx6qp3lsu3P5%2FScreen%20Shot%202018-05-22%20at%206.47.02%20AM.png?alt=media\&token=edbb20f8-2818-454f-9701-3148a7e4fea7)

In most apps, one event leads to another event if a **condition** is met. To specify these scenarios, the `this`, do `that` block is commonly used with [Logic](https://docs.thunkable.com/~/changes/wHhkjLVeheBnfbpghRnw/logic) blocks that define the conditions that lead one event to the next.

The if `this`, do `that` block can be transformed to support more complex logic

![The purple settings icon can be used to add additional conditions for events](https://1223006790-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LAn5scXl2uqUJUOqkJo-84897653%2Fuploads%2FtI0C6AnVmJLluUEs6bnK%2Fdocs-1.png?alt=media\&token=2f68e432-a709-487c-a50a-e24329980d78)

### Test

The Test block can be used to 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.

![](https://1223006790-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LAn5scXl2uqUJUOqkJo%2F-MXleT3gvKM7TKnDEG_h%2F-MXlv0afJcaRLvTewo-I%2FScreen%20Shot%202021-04-08%20at%203.36.51%20PM.png?alt=media\&token=277691dd-4c7d-4a5d-b3b0-2c747f132792)

## Wait

![](https://1223006790-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LAn5scXl2uqUJUOqkJo-84897653%2Fuploads%2FbQNmO48lbNJIXimSGlX4%2Fwait.png?alt=media\&token=1500b4b9-f771-4443-a8f7-7d1154b84641)

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

## Loops

Repeat a set of blocks for a specified amount of time

### Forever

![](https://1223006790-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LAn5scXl2uqUJUOqkJo%2F-MXleT3gvKM7TKnDEG_h%2F-MXltXm3vgLdk1DKXcMf%2FScreen%20Shot%202021-04-08%20at%203.31.44%20PM.png?alt=media\&token=55a0f2ce-8153-4c95-bb0e-f352e30e1d98)

Repeat an action for an unlimited period of time

### Repeat \[10] Times

![](https://1223006790-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LAn5scXl2uqUJUOqkJo-84897653%2Fuploads%2F9ZNTzDG2PMkXFY0tmDT8%2Frepeatxtimes.png?alt=media\&token=cf17039b-5003-4381-b4a4-c8fd2c9b4ebe)

Repeat an action the specified number of times

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

![](https://1223006790-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LAn5scXl2uqUJUOqkJo-84897653%2Fuploads%2FPziUc5BrEBA65D1FXzqs%2Fcountwithi.png?alt=media\&token=06e6dcb8-3751-4eb4-9be2-910c38044cf0)

Repeat an action for a certain amount of times, with the incrementer index *i*

### For each item j in list

![](https://1223006790-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LAn5scXl2uqUJUOqkJo%2F-MXleT3gvKM7TKnDEG_h%2F-MXltynkwlo14I0srj1Z%2FScreen%20Shot%202021-04-08%20at%203.33.51%20PM.png?alt=media\&token=9c9b52c6-754c-44bd-a060-2051186fdf8a)

Repeat an action over every item in a list

### Repeat while

![](https://1223006790-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LAn5scXl2uqUJUOqkJo%2F-MXleT3gvKM7TKnDEG_h%2F-MXluIqqMMZEARXVBNC_%2FScreen%20Shot%202021-04-08%20at%203.35.12%20PM.png?alt=media\&token=3a5eb619-b09d-4fab-b51a-3f6c9d52d758)

Repeats an action while a condition is true

### Break out of loop

![](https://1223006790-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LAn5scXl2uqUJUOqkJo-84897653%2Fuploads%2FACQWMhIObO77NvepqgH7%2Fbreak.png?alt=media\&token=756aa388-3fa6-467c-bf56-96527e1967a9)

Break out of an existing loop

## Open an Installed App or Website by Link

![](https://1223006790-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LAn5scXl2uqUJUOqkJo%2F-LAn5wecEraNWaG7Ig2g%2F-LAn67AX3DtlqidVUA7T%2Fblocks-control-%E2%9C%95-fig-6.png?generation=1524497179533439\&alt=media)

You can prompt a user to open a page within an app installed on their phone or a url in their browser using the block above.

If the device has the relevant app installed, the link will open in the app. Otherwise, the link will open in the browser.
