Search

User Manual

Getting Started


Modules and Platform


Appendix


Tutorials & Helpful Tricks


Glossary


Strategic Partner Links

Sepasoft - MES Modules
Cirrus Link - MQTT Modules

Resources

Inductive University
Ignition Demo Project
Knowledge Base Articles
Forum
IA Support
SDK Documentation
SDK Examples

All Manual Versions

Ignition 8
Ignition 7.9
Ignition 7.8

Deprecated Pages

Skip to end of metadata
Go to start of metadata

This function is used by Ignition's Expression language.

Description
This function evaluates the expression condition, and returns the value of trueReturn or falseReturn depending on the boolean value of condition.
Syntax

if(condition, trueReturn, falseReturn)

  • Parameters

object condition - The condition to evaluate.

object trueReturn - The true return value.

object falseReturn - The false return value.

  • Results

object - Returns the trueReturn if the condition is true, falseReturn if it is False.

Examples
Code Snippet
 if(1, "Yes", "No") //would return "Yes"
Code Snippet
 if(0, "Yes", "No") //would return "No"
Code Snippet
 if({Root Container.CheckBox.selected}, "Selected", "Not Selected") //would return with a description of the state of the checkbox
  • No labels