---
title: States with conditions
description: On all elements it is possible to use States with conditions to control whether the element is shown or not, based on answers the patient has entered in…
---

[Skip to content](https://support-test.youwell.no/en-gb/support/solutions/articles/153000237540#main-content)

- [English - United Kingdom](https://support-test.youwell.no/en-gb/support/solutions/articles/153000237540)
- [Norwegian Bokmål](https://support-test.youwell.no/nb/support/solutions/articles/153000237540)

English - United Kingdom

Show submenu for translations

[Contact us](https://support-test.youwell.no/en-gb/kb-tickets/new?hsLang=en-gb) [My tickets](https://support-test.youwell.no/tickets?hsLang=en-gb)

[![Copy of Brukerstøtte Logo](https://support-test.youwell.no/hs-fs/hubfs/Copy%20of%20Brukerst%C3%B8tte%20Logo.png?width=177&height=80&name=Copy%20of%20Brukerst%C3%B8tte%20Logo.png)](https://youwell.no)

Open main navigation

Close main navigation

- - [English - United Kingdom](https://support-test.youwell.no/en-gb/support/solutions/articles/153000237540)
    - [Norwegian Bokmål](https://support-test.youwell.no/nb/support/solutions/articles/153000237540)

  English - United Kingdom
  
  Show submenu for translations
- [Contact us](https://support-test.youwell.no/en-gb/kb-tickets/new)
- [My tickets](https://support-test.youwell.no/tickets)

 How can we help you?

- There are no suggestions because the search field is empty.

1. [Youwell](https://support-test.youwell.no/en-gb?hsLang=en-gb)
2. [Program](https://support-test.youwell.no/en-gb/program?hsLang=en-gb)
3. [Content and elements](https://support-test.youwell.no/en-gb/program?hsLang=en-gb#content-and-elements)

# States with conditions

On all elements it is possible to use **States with conditions** to control whether the element is shown or not, based on answers the patient has entered in earlier questions and questionnaires.

A typical example is a question around worsening of the patient's illness or symptoms recently, where you want to collect more information based on whether the patient answers “Yes”. The following diagram shows such a typical flow in this situation:

![](https://support-test.youwell.no/hubfs/Knowledge%20Base%20Import/aOo7mWrOXjieO_sSRDgUJ9Rcq0P95oSafw-1.png)

This is a scenario where more questions can be added if the patient answers “Yes” to the first question.

### Adding a new conditional state

In the menu inside a default element there is the function to add **States with conditions**.

![](https://support-test.youwell.no/hubfs/Knowledge%20Base%20Import/Ly0VH8VwInVwtXT8IFqXRPp85kxNza8MOQ-1.png)

![](https://support-test.youwell.no/hubfs/Knowledge%20Base%20Import/s67dfgMc72nIZamebOGQDxeL8ZfVhAhwew-1.png)

Under **Add new state** it is possible to choose between **Visible** or **Hidden**.

![](https://support-test.youwell.no/hubfs/Knowledge%20Base%20Import/RPvZkaeL_aGuy6UBzM2VRle_2TeYcNBrZQ-1.png)

**Visible** describes that the element is shown when the conditional state is fulfilled, and **Hidden** describes that the element is not shown in such cases. To create a new state, you can use the plus symbol, and a popup window gives the possibility to find the correct module, questionnaire or additional content that contains the question you wish to link to the element.

![](https://support-test.youwell.no/hubfs/Knowledge%20Base%20Import/NphYXrR7wuu0vCw37s3wBtMjXtw1At4O-A-1.png)

In the above example, a button question has been chosen such that if the patient clicks the button, this element will be shown, otherwise it will be hidden.

### Order and logic

The order of the different states affects how the system evaluates aand priorities the rules. The system will try to find the first state that matches in the order that is set. The arrows next to each state can be used to change the order.

It is also possible to add an AND relation to describe a more specific condition. More rules under the same point can be added using the plus symbol.

![](https://support-test.youwell.no/hubfs/Knowledge%20Base%20Import/o4-HEJYj4E-l2XANHdClHTSZOoma6EID_A-1.png)

If more states of the same type are added, this functions as an OR relationship.

![](https://support-test.youwell.no/hubfs/Knowledge%20Base%20Import/TgfM8vwHJy7y3Kb7N-Pcau-mj6ZwJbOlWA-1.png)

A typical setup will often begin with some visible states and end with some hidden states.

### Button question

A typical use case is a button question that shows more information when the patient presses the button. In this example the first state is set so that when the button is “Active”, the element will be made *visible*. When the button is “Inactive”, the element is *hidden*.

![](https://support-test.youwell.no/hubfs/Knowledge%20Base%20Import/Ku9Tpex4UcP150DRGJgpLZ0_wmvNYFC0Dw-1.png)

Conditional states can also be used in this way on elements within **Additional content** to show extra content, for example videos, articles or images, based on whether the patient wants more information about a topic.

In addition, conditional states can be useful to give the patient some feedback, like a bit of praise, when they have answered a quiz element. Typically this will be created by adding the correct answers from all the questions in the quiz plus *If the results has been displayed* rule.

![](https://support-test.youwell.no/hubfs/Knowledge%20Base%20Import/Lq5Zt_1UNDlMr97bzCVvbV0SlfBkD0wMVg-1.png)

- [Administrator](https://support-test.youwell.no/en-gb/administrator?hsLang=en-gb#main-content)

    - [Settings](https://support-test.youwell.no/en-gb/administrator?hsLang=en-gb#settings)
    - [Admin Tools](https://support-test.youwell.no/en-gb/administrator?hsLang=en-gb#admin-tools)
    - [Reports](https://support-test.youwell.no/en-gb/administrator?hsLang=en-gb#reports)
- [General](https://support-test.youwell.no/en-gb/general?hsLang=en-gb#main-content)

    - [Get started!](https://support-test.youwell.no/en-gb/general?hsLang=en-gb#get-started)
- [Program](https://support-test.youwell.no/en-gb/program?hsLang=en-gb#main-content)

    - [Creating a new program](https://support-test.youwell.no/en-gb/program?hsLang=en-gb#creating-a-new-program)
    - [Program Timeline](https://support-test.youwell.no/en-gb/program?hsLang=en-gb#program-timeline)
    - [Program Settings](https://support-test.youwell.no/en-gb/program?hsLang=en-gb#program-settings)
    - [Content and elements](https://support-test.youwell.no/en-gb/program?hsLang=en-gb#content-and-elements)
    - [Additional Registrations](https://support-test.youwell.no/en-gb/program?hsLang=en-gb#additional-registrations)
- [Calendar](https://support-test.youwell.no/en-gb/calendar?hsLang=en-gb#main-content)

    - [Get started with Calendar](https://support-test.youwell.no/en-gb/calendar?hsLang=en-gb#get-started-with-calendar)
    - [Templates, groups & custom calendars](https://support-test.youwell.no/en-gb/calendar?hsLang=en-gb#templates-groups-custom-calendars)
    - [Calendar administration](https://support-test.youwell.no/en-gb/calendar?hsLang=en-gb#calendar-administration)
    - [Appointments](https://support-test.youwell.no/en-gb/calendar?hsLang=en-gb#appointments)
- [Following Up Patients](https://support-test.youwell.no/en-gb/following-up-patients?hsLang=en-gb#main-content)

    - [Patient Page](https://support-test.youwell.no/en-gb/following-up-patients?hsLang=en-gb#patient-page)
    - [Patient List](https://support-test.youwell.no/en-gb/following-up-patients?hsLang=en-gb#patient-list)
- [Patient App](https://support-test.youwell.no/en-gb/patient-app?hsLang=en-gb#main-content)

    - [Patient App](https://support-test.youwell.no/en-gb/patient-app?hsLang=en-gb#patient-app)
    - [Mobile App](https://support-test.youwell.no/en-gb/patient-app?hsLang=en-gb#mobile-app)

[![youwell\_logo\_Gray](https://support-test.youwell.no/hs-fs/hubfs/youwell_logo_Gray.png?width=124&height=50&name=youwell_logo_Gray.png "youwell_logo_Gray")](https://support-test.youwell.no/?hsLang=en-gb)

© Youwell AS