Variables
Outline
In this article, we'll go over what variables are in Evolve, how to store and display a value in variables, how to style a variable, and how to check a variable value.
Variable overview
Variables can store string (text), number, or boolean (true or false) value types. Variables are created in Logic section when editing a course. Variables can also have a default value set.
Variables can be used to display their value in the course or as an event source for a trigger.
![](https://cdn.exceedlms.com/uploads/resource_images/targets/4445305/page_large/variables.png?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9jZG4uZXhjZWVkbG1zLmNvbS91cGxvYWRzL3Jlc291cmNlX2ltYWdlcy90YXJnZXRzLzQ0NDUzMDUvcGFnZV9sYXJnZS92YXJpYWJsZXMucG5nIiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNzI1NzU3MTY4fX19XX0_&Signature=dCAr2NdCRBf4gnM3fCRJKukd7he8qOF6LKcw3eCvkEXmbFlnia-ICbr4GL-COjuJImeQxhPAM8CFFkW6DpeUr7eJjkqHztgubRYrN3s~Eh0BcKrcrWCShn4rYFbS63UlSsQ4fe4EyfdEPE5nUI98I487YZ7nbY7WtAFLJ8Y75gvc0Dpqe4eaRkNhnoPgM4nkMNicBRwl8xjCQnOWN~JdcbAXhV2nGrnO6CP4Z4mHRHImk4XDS2TEON8VxDZRmRg9UtP3GponBucjZsIvh-LmHpjijrfQncAqoHKl~C0Ds-PlsiB5k~8UPkG1BMQdWo-a5wd-NJv3jc~hRwxme9yMCg__&Key-Pair-Id=APKAJINUZDMKZJI5I6DA)
Store a value in a variable
Certain components and extensions can store a value into a variable. Each of these components has a specific variable type that it can be saved to. For example, the Number Input Component can only save to variables of a Number type.
Components that support saving a value to a variable can be found in Behavior section when editing properties of a component.
![](https://cdn.exceedlms.com/uploads/resource_images/targets/4445335/page_large/logic.png?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9jZG4uZXhjZWVkbG1zLmNvbS91cGxvYWRzL3Jlc291cmNlX2ltYWdlcy90YXJnZXRzLzQ0NDUzMzUvcGFnZV9sYXJnZS9sb2dpYy5wbmciLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjE3MjU3NTcxNjh9fX1dfQ__&Signature=crB8EWAzTuEf7Y7sp7nnZhTnhcttnLR0ckm00nIR45K9J1rm4HnKgqH9QpxYdwrkMct2-st3ScDPyAH8xHPbhl2Gv6gFprA9mI~uQM505BGzxtd1Al0CQqNQEeQJB3CjHd10Xh-W9fxSFWMH0~oqwd3kWykuQqSxwb3ZMcB~HUzxDogBqa3herVjdSY1RzlDpoRp5u4xFeV0P24uOSUTAOV6PaO1Kvw6PTN~Fu9z8mtsMfMVhDm-lN9eqp~je6K8ZlZWhl~naVwz6yBGMd9AhXw~6D4pmwjEt-5Hpmir7F-cKreQlgdyb2s3bThTtUnJBEkZNte-sxJzhlO6~9RS7g__&Key-Pair-Id=APKAJINUZDMKZJI5I6DA)
You can also set how a Component can store a value to a variable:
- String Variable types can have their value replaced or concatenated to.
- Number Variable types can have their value replace, increased or decreased.
Triggers are also able to set a variables value using the appropriate action type.
Display a variable value in a course
The text editor in Evolve supports displaying the variables value in a course. Simply add the variable anywhere by clicking on the Insert Variable button in the text editor and the current value will be displayed in the course.
![](https://cdn.exceedlms.com/uploads/resource_images/targets/4445351/page_large/insert-variable.png?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9jZG4uZXhjZWVkbG1zLmNvbS91cGxvYWRzL3Jlc291cmNlX2ltYWdlcy90YXJnZXRzLzQ0NDUzNTEvcGFnZV9sYXJnZS9pbnNlcnQtdmFyaWFibGUucG5nIiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNzI1NzU3MTY4fX19XX0_&Signature=Er5xH8g8XsbUoBGHmmdquENZZnQiWYlXPmpncNZ30NWo2-7wVnbdYDo-BiSunHQ-JB2ja4dEUkZU8ico-1TGHWLxlVCa-hkqKarfawi1qzltNNVSFh60XPCxrYDSIYjKKRO54wwfcxVfsMUhYJ3U5prpntzGS1MmoSeG4j7eC5D6nV3jGC3kU2i7la2WuAIBpqqhz-ZzMmapXE1FbKQFmKSJEXgoDWeHCsEX5l8rO9XY0iS2PiDgdlrC8Z30ZLNM7Z8-TTUNRAi01GKnFkV2gceSU7DITRMhZylOwNweJg5SWrq612Z2R0W~A7KXJD0fjcjDE2WUYwYo5ukDYUP9nw__&Key-Pair-Id=APKAJINUZDMKZJI5I6DA)
Style a variable
It is possible to style the appearance of a variable when it is displayed in a course. This can be done via the theme (this is our recommended approach) or, if you wish to style them individually, the variables section.
![](https://cdn.exceedlms.com/uploads/resource_images/targets/2004663/page_large/2021-04-13-15-22-29.png?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9jZG4uZXhjZWVkbG1zLmNvbS91cGxvYWRzL3Jlc291cmNlX2ltYWdlcy90YXJnZXRzLzIwMDQ2NjMvcGFnZV9sYXJnZS8yMDIxLTA0LTEzLTE1LTIyLTI5LnBuZyIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTcyNTc1NzE2OH19fV19&Signature=dt-HSKN7iWrbtJIM4TcmapfTN2p3x6HOyCGKsc-1An~1MXSfsqXjYVNpfgcY2BwuvzkbzzirgkP10XPtTeQvDiY8FffF141HU6YeUW8h0gex7rERGGT6pYLkkyJa~sAgsQ0abrUa~ZRZCDo1z4Mp4XGyEZuSj1V4B0LIcdbSnNWEr2sgTlgQkTkGc~8gX5VrtQk6QF1ZwNgkHjp7pS91ZCNKVeKLT48EDNtn1kLHiqUbaB9ohJLhX9r8ZtAuV8OBMt4iByqM95Nmr3wBA3eM3RRjwunuyndgL0LxZVSVvbBaU9D0lrnk-6Tfd-nJ2B1xlTNhVAd6nDoP5V8yiCI7VA__&Key-Pair-Id=APKAJINUZDMKZJI5I6DA)
When creating the variable you can choose your style settings:
- None - No style will be applied
- Theme - Will pull from the theme
- Inline - Will allow you to create a specific style for that variable
Theme
To set your style in the theme:
- Go to the Appearance tab in your course.
- Go to the Variable menu item tab.
- You can now set your course-wide Variable style:
- Background color
- Border
- Border radius
- Box Shadow
- Layout
- Text appearance
You can then repeat this process in specific Article Styles.
Inline
When creating the variable, you will need to set the Style dropdown to Inline. You will then be shown the same settings as above. This option will allow you to style individual variables.
![](https://cdn.exceedlms.com/uploads/resource_images/targets/2004675/page_regular/2021-01-12-16-27-13.png?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9jZG4uZXhjZWVkbG1zLmNvbS91cGxvYWRzL3Jlc291cmNlX2ltYWdlcy90YXJnZXRzLzIwMDQ2NzUvcGFnZV9yZWd1bGFyLzIwMjEtMDEtMTItMTYtMjctMTMucG5nIiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNzI1NzU3MTY4fX19XX0_&Signature=JxHaZ3LDu8z3bnyq8XM~LvSIAUfjI2b2F1S9NJiTrpW20x0zm0A0ACTHpQ57yEAytBYb-m1G17NwSEVxftJXDskA69CxEamx-SRkZLogmpNJ91YM5NeMU3OUkNP2tOaL35SD9DLm-KNawAWdXYvWjnbLeueWQiyYZuBi7sbSM0weLlPSJ1lkRMYY0Gmhbdpnyjgp-x5gTolP-vsGfzYO3h5KXiENFzKjbB4f-FMZOCx8S-s5KESZ0uvCQ1WSh2bjcnAyyNfQSqTBPOOhx-uzX-tGh7P6gvWaesYQunheAVxQcgs9i5dvhIpp9Stfjvm3hCJuhdr65WX0Iu7-HstfvA__&Key-Pair-Id=APKAJINUZDMKZJI5I6DA)
Did this article help?
Let us know by leaving a star rating or review at the top of this article.