A variable is an area of a phone, tablet or computer's memory that you can use to store information temporarily while your app is running. Variables can contain text, numbers, names, addresses, dates or just about anything else. The contents of variables can be used in calculations, displayed on-screen, sent via HTTP to a server for processing, saved to a file, etc.


Many objects, such as Check Boxes, Radio Buttons and Text Input Fields, use variables to store information about their status or contents. You can use these variables, and others you create, within action parameters in addition to or in place of literal text. For example, you might require readers to enter their name at the start of your app. A Text Input Field created for this purpose records the name into a variable. Later, that variable could be used to document a test score or to personalize the publication by adding the name to various screens.


Each variable used within an app should be given a unique descriptive name. Like a pet, variables can be given almost any name. When used in VisualNEO Web, however, variable names should always be surrounded by brackets ([ ]). This is how VisualNEO Web knows that you're talking about a variable named [Spot] and not the word “Spot”. Some examples of valid variable names are:


[Answer] [Name] [Price] [Score] [X] [Y]


Referencing a variable within action parameters is simple - just insert the variable’s name into the text - remembering to enclose it in brackets, of course. For example:


AlertBox "Greetings" "Hello [Name]. Welcome to my app!" ""


Some advanced actions use variables to pass information back to you. In the example below, the StrUpper action converts a line of text to all uppercase letters and places a copy of the modified text into a variable called [Upper]:


StrUpper "the yellow dog jumper over the fence." [Upper]


Variables may be inserted anyplace within your app where text is required: object captions, action parameters, file names, etc. For example, an app that required users to enter their name might also include a Push Button with the following caption:


[Name], please press this button to continue.


When viewing the publication, a user named Sally would see: