Axure Tutorial: Instructions on the Use of IF and ELSE IF in Interactions


In situations where conditional logic is required, it is often necessary to set cases, which may be confusing for novices. It is very similar to statements in programming. Today, we will learn how to use IF and ELSE IF cases.

Example: Interactions "When the Weather Changes"

Use case 1: IF rains, executes "with umbrella"

Use Case 2: ELSE IF Hailstorm executes "Wearing a Steel Helmet"

Use case 3: ELSE IF executes with nothing

What does this mean? In Axure, by default, each use case in Axure Interactions is associated and executed from top to bottom. The above example is in Vernacular:

When the weather changes, if the case (rains) is true, bring an umbrella; otherwise (else if)case is true (Hailstorm), wear a helmet; otherwise (else if) case is true, bring nothing.

If the IF case is satisfied, only the actions within IF will be executed, and the following ELSE IF cases actions will not be executed. 

However, if there are IF(S) below ELSE IF  , all subsequent IF(s) actions will be executed.

I don't know if this explanation is clear. I hope you can understand it.

Here is an example:

If I enter 1 in the text field, box will display text 1. What if I enter 2? Please think about what text will appear in the box? 1 or 2? 

The answer is 3. Because all IF cases actions will be executed. If I enter 2, the actions in IF and ELSE IF will be performed first. Then, the action in the last IF is performed.

What if I toggle the last IF to ELSE IF (right click on the case and select Toggle IF/ELSE IF)? The answer is 2. Because the system executes the actions in the first ELSE IF, it will not execute the actions in the next ELSE IF

If you have any questions and suggestions, please leave a message.

If you like the article, please share it with others with page link, thanks for your supporting! ❤

Well Joe @AxureBoutique, a technology writer and teacher, focuses on Axure prototype design and product design.

Leave a comment

Please note, comments must be approved before they are published

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

This section doesn’t currently include any content. Add content to this section using the sidebar.