Académique Documents
Professionnel Documents
Culture Documents
All App Builder actions together conform what we can name the App Builder Script language. As you know, App Builder produce HTML5 hybrid apps
based in the JavaScript language. You can use arbitrary JavaScript in your apps, however, probably you can make whatever you wanted using only
App Builder actions, in a visual way, because every action have their appropiate action's editor.
Below you can view the App Builder actions reference. Remember this help file are linked to App Builder in the sense that every action's editor help
button redirect here in the right action reference.
App
IdleStart
IdleStop
ToggleFullscreen
SetAppScaled
SetViewSize
SetAppTheme
BlockApp
UnblockApp
IsAppBlocked
BlockedText
Events
PreventDefault
StopPropagation
Views
ShowView
ReplaceView
ReloadView
ShowDialog
CloseDialog
Tools
Hide
Show
Toggle
Enable
Disable
Blur
Focus
GetStyle
SetStyle
AddClass
HasClass
ToggleClass
RemoveClass
SetAttribute
GetAttribute
SimpleScrollbar
Variables
SetVar
VarIsNull
VarIsTrue
VarIsFalse
VarIsString
VarToString
VarIsNumber
VarIsArray
VarIsObject
VarIsUndefined
LoadVariables
ParseVariables
Strings
StrLen
SubStr
StrHash
StrHMAC
StrNumber
TrimStr
SplitStr
LowerStr
UpperStr
StrSearch
StrReplace
StrReplaceAll
StrToBase64
Base64ToStr
EncodeUri
DecodeUri
StrSerialize
StrUnserialize
IsIP
IsEmail
IsAlphaNum
IsAlpha
IsASCII
IsBase64
IsCreditCard
IsUUID
IsFQDN
IsISBN
IsISIN
IsJSON
IsHexColor
IsLowercase
IsUppercase
Arrays
NewArray
ArrayLength
ArrayClear
ArrayPop
ArrayShift
ArrayPush
ArrayUnshift
ArrayConcat
ArrayGetItem
ArraySetItem
ArrayRemoveItem
ArrayReverse
ArraySortAsc
ArraySortDesc
ArrayNumSortAsc
ArrayNumSortDesc
ArrayIndexOf
ArrayLastIndexOf
Objects
NewObject
ObjectGetProp
ObjectSetProp
Datetime
NewDate
DateValid
DateFormat
DateGet
DateSet
DateAdd
DateSubtract
DateDiff
DateToIso
DateToArray
DateToObject
DateToUnix
DateToTimestamp
DateMonthDays
DateYearIsLeap
DateIsBefore
DateIsSame
DateIsBefore
Storage
SetOption
GetOption
RemoveOption
ClearOptions
SetCookie
GetCookie
RemoveCookie
ClearCookies
IsCookiesEnabled
Alerts
Alert
Confirm
Prompt
AlertBox
MessageBox
InputBox
Beep
Vibrate
Math
Math
Abs
Dec
Inc
Exp
Pow
Log
Cos
Acos
Sin
Asin
Tan
Atan
Atan2
Round
Ceil
Sqrt
Floor
Random
RandomEx
Control
If
IfEx
Else
ElseIf
EndIf
While
EndWhile
EndLoop
Break
Sleep
Return
Exit
Device
DeviceId
DeviceModel
DeviceVersion
DevicePlatform
Timer
TimerStart
TimerStop
TimerInterval
Watcher
WatcherStart
WatcherStop
WatcherVariable
Events
ShareByControl
ShareByObject
HTTP
SimpleGet
SimplePost
HttpExecute
HttpSetUrl
HttpSetMethod
HttpSetData
HttpClearData
HttpStatus
HttpStatusText
HttpResponse
Pusher
PusherConnect
PusherDisconnect
WebSocket
SocketOpen
SocketSend
SocketClose
Media
PlaySound
MediaPlay
MediaPause
MediaStop
MediaProperty
MediaSeekPercent
MediaSeekSeconds
MediaSetVolume
MediaFullScreen
MediaSetSource
MediaShowControls
MediaHideControls
Windows
OpenWindow
CloseWindow
Sensors
Geolocation
Acceleration
CompassHeading
Debug
Watch
Console
JavaScript
StartJS
EndJS
ApplyModel
ThrowError
Camera
CameraGetPicture
Barcode
BarcodeScan
Network
GetNetworkType
Files
FileWrite
FileAppend
FileRead
Launcher
LauncherCheck
LauncherStart
LauncherAction
Argument name
Argument type
Argument value
String
Theme name
BlockApp
Use this action to block the app user interface, for example, until a performed HTTP request is complete. When the app user interface is blocked the
user can't interact with any of the app controls. To unblock a previously blocked app user interface you must use the UnblockApp action.
Take a look at the App Builder included BlockApp* app samples in order to learn how to use the block app related actions.
Back to the index
UnblockApp
Use this action to unblock a previously blocked app user interface. To block the app user interface you can use the BlockApp action.
Take a look at the App Builder included BlockApp* app samples in order to learn how to use the block app related actions.
Back to the index
Argument name
Argument type
Argument value
Result variable
String
Store "true" if the app user interface is blocked or "false" when not.
BlockedText "Text"
Use this action to change the text of the app user interface blocked container (see the BlockApp action). The text can be changed also if the app is
currently blocked.
Take a look at the App Builder included BlockApp* app samples in order to learn how to use the block app related actions.
Argument name
Argument type
Argument value
Text
String
IdleStart "Seconds"
Use this action to initiate the app idle watcher. By default the app idle watcher is not enabled in order to save but you can initiate it using this action
by establish the number of seconds you wanted to enter in app idling after reach such seconds.
Once you call this action and before call IdleStop action the appropiate IdleStart and IdleEnd app events can be fired.
Take a look at the "[App.IdleIsIdling]" and "[App.IdleIsRunning]" app global variables.
Argument name
Argument type
Argument value
Seconds
Number
IdleStop
Use this action to stop a previously initiated app idle watcher by use the IdleStart action.
Once you call this action the IdleStop action the appropiate IdleStart and IdleEnd app events are not fired anymore.
Take a look at the "[App.IdleIsIdling]" and "[App.IdleIsRunning]" app global variables.
Back to the index
ToggleFullscreen
This action toggle the app fullscreen state, that is, if the app is already in fullscreen, this action exit the fullscreen and viceversa. Take a look at the
"[App.Fullscreen]" global variable.
Back to the index
Argument name
Argument type
Argument value
Scaled mode
String
Use this action to establish the size of the current app's view. This action si particularly useful if our application uses the Scaled option or when we
previously use the SetAppScaled action with the "scaled" option.
Take a look at the Scaled app sample to view this action running.
Argument name
Argument
type
Argument value
Specify the new current app's view width. You must specify the unit, for example, "800px" to use pixels,
Width
String
"100wv" to use the entire device's viewport, etc.
Specify the new current app's view height. You must specify the unit, for example, "600px" to use pixels,
Height
String
"100hv" to use the entire device's viewport, etc.
Argument name
Argument type
Argument value
Event variable
String
The Event variable to be used, for example, the global variable [App.Event], an [ViewName.Event] or a [Cont
Argument name
Argument type
Argument value
Event variable
String
The Event variable to be used, for example, the global variable [App.Event], an [ViewName.Event] or a [Cont
This action show the specified app view and put it into the URL history, then the user can navigate back using the back button from their browser or
mobile device. If you do not wanted this behaviour use the ReplaceView action instead.
The View name combobox in this action's editor allow us to choose an app view name from the existing ones.
You can show an app view as a dialog using the ShowDialog action.
Argument name
Argument type
Argument value
View name
String
If you wanted to add the specified app view into the URL history the ShowView action is for you.
The View name combobox in this action's editor allow us to choose an app view name from the existing ones.
You can show an app view as a dialog using the ShowDialog action.
Argument name
Argument type
Argument value
View name
String
ReloadView
Reload the current app view. This action cause the current app view to be reloaded. This action no requires any argument.
Back to the index
The app view "Show" event is fired when an app view is shown, also when it's shown as a dialog.
The View name combobox in this action's editor allow us to choose an app view name from the existing ones.
Argument name
Argument type
Argument value
View name
String
CloseDialog
Close the current modal dialog. This action can be used from an app view show with the ShowDialog action in order to close the dialog. This action
no requires any argument.
Back to the index
Use this action to hide the specific app view control. You can hide an app view control by manipulate their "Hidden" variable or by adding or removing
the appropiate CSS class, however, this action is a convenient shortcut in order to hide an app view control.
You can show a control using the Show action and also can toggle the control visibility to using the Toggle action.
Argument name
Argument type
Argument value
Control name
String
Argument name
Argument type
Argument value
Control name
String
You can show a control using the Show action and also can hide a control using the Hide action.
Argument name
Argument type
Argument value
Control name
String
Argument name
Argument type
Argument value
Control name
String
Argument name
Argument type
Argument value
Control name
String
Argument name
Argument type
Argument value
Control name
String
Argument name
Argument type
Argument value
Control name
String
Argument name
Argument type
Argument value
Control name
String
CSS property
String
Result variable
String
Use this action to set the value of a CSS style property of the specified control.
You can get CSS properties of an app view control using the GetStyle action.
Argument name
Argument type
Argument value
Control name
String
CSS property
String
Property value
String
Argument name
Argument type
Argument value
Control name
String
CSS class(es)
String
Argument name
Argument type
Argument value
Control name
String
CSS class(es)
String
Result variable
String
You can add one or more CSS classes using the AddClass action and remove one or more CSS classes using the RemoveClass action. This action
remove the CSS class if exists, or put it available when not.
Argument name
Argument type
Argument value
Control name
String
CSS class(es)
String
Argument name
Argument type
Argument value
Control name
String
CSS class(es)
String
Argument name
Argument type
Argument value
Control name
String
Attribute name
String
Attribute value
String|Number
Argument name
Argument type
Argument value
Control name
String
Attribute name
String
Result variable
String
Argument name
Argument type
Argument value
Control name
String
Commonly the name of an HtmlContent control. Can be also an HTML element ID.
The variable type determine the way in which the variable is treated when it's converted to their JavaScript representation. Basically, if you want to
store a number in a variable, choose the "Number" type for your variable. In any other case choose the "String" type for your variable.
All variables are global to the app, except the app functions variables/arguments, which can be used only inside the function in which resides. This
mean that you can set a variable from an app view, for example, and this are automatically available in other app views.
After all, this action is very powerfull, since app controls exposes lots of variables, and you can use this action to set or update such variables
contents. For example, you can hide a control using their "Hidden" variable, just like in the below code:
// Hide the Input1 control
In a similar way, you can show a hidden control using the same "[Input1.Hidden]" variable, this time passing as argument an empty string, which
mean "false", then the below code show a previously hidden control:
// Show the Input1 control
App views controls expose various variables which can be manipulated using this action. The above "Hidden" variable is just one example. We refer
you to the app controls section in this help to discover what variables exposes the available app controls.
As I mentioned above, you can use app variables to store useful information in order to be used in other places. If you wanted to store information
which are no loss when your app close, you can use the SetOption and GetOption actions instead.
Last but no least, note that App Builder variables are writen wrapped in "brackets". This is the way you can refer to a variable when needed,
however, note also that in some situations the brackets are optional. For example, the both statements in the below code does exactly the same:
SetVar "[Input1.Hidden]" "" "String"
Note that a more convenient way to show, hide or toggle the visibility of an object can be the directly use of the Show, Hide and Toggle actions.
Argument name
Argument type
Argument value
Variable name
String
Variable value
Mixed
Variable type
String
Argument name
Argument type
Argument value
Variable name
String
Result variable
String
The result variable. Store "true" if the specified variable is null, or "false" when not
Argument name
Argument type
Argument value
Variable name
String
Result variable
String
The result variable. Store "true" if the specified variable is a boolean true, or "false" when not
Argument name
Argument type
Argument value
Variable name
String
Result variable
String
The result variable. Store "true" if the specified variable is a boolean false, or "false" when not
Argument name
Argument type
Argument value
Variable name
String
Result variable
String
The result variable. Store "true" if the specified variable is an string, or "false" when not
Argument name
Argument type
Argument value
Variable name
String
Result variable
String
The result variable. Store the string representation of the specified variable.
Argument name
Argument type
Argument value
Variable name
String
Result variable
String
The result variable. Store "true" if the specified variable is a number, or "false" when not
Argument name
Argument type
Argument value
Variable name
String
Result variable
String
The result variable. Store "true" if the specified variable is an Array, or "false" when not
Argument name
Argument type
Argument value
Variable name
String
Result variable
String
The result variable. Store "true" if the specified variable is an Object, or "false" when not
Argument name
Argument type
Argument value
Variable name
String
Result variable
String
The result variable. Store "true" if the specified variable is undefined, or "false" when not
LoadVariables "URL"
Use this action to load one or most commonly more than one variable from an app file or a remote file. This action is mostly intented to be used with
app files, because they do not provide any feedback about the progress or possible errors. The action expected an URL that provide a text plain file
in this format:
Var1=Var value
Var2=Other value
Var3=Another more
As you can see the file defines various variables separated by lines, and variable names/values separated by the "=" character. Once the action
retrieve such text they are parsed and the "[Var1]", "[Var2]" and "[Var3]" variables are created (or updated) with their respectively values.
App Builder also can to load Array variables. To do this your variable values must start with the "|" (pipe) character and then use the same "|"
character to separate the different substrings. For example, supose the below file contents:
Var1=Var value
Var2=Other value
Var3=|Blue|Red|Green|Pink
In the above case the "[Var3]" variable store an Array variable with four items: "Blue", "Red", "Green" and "Pink".
Argument name
Argument type
Argument value
URL
String
This action can be very useful when use with app files. Also can be used with remote files, but, they do not provide any feedback. If you need that
feedback try a combination of the HttpClient control and the ParseVariables action. Take a look at the included app samples "LoadVars" and
"ParseVars" too.
Back to the index
ParseVariables "Text"
Use this action to load one or most commonly more than one variable from the specified text. The text expected by this action is something like the
below one:
Var1=Var value
Var2=Other value
Var3=Another more
As you can see the file defines various variables separated by lines, and variable names/values separated by the "=" character. The are parsed and
the "[Var1]", "[Var2]" and "[Var3]" variables are created (or updated) with their respectively values.
App Builder also can to load Array variables. To do this your variable values must start with the "|" (pipe) character and then use the same "|"
character to separate the different substrings. For example, supose the below file contents:
Var1=Var value
Var2=Other value
Var3=|Blue|Red|Green|Pink
In the above case the "[Var3]" variable store an Array variable with four items: "Blue", "Red", "Green" and "Pink".
Argument name
Argument type
Argument value
URL
String
This action can be very useful when use with remote files. Also can be used with app files, but, then a probably better choice can be
the LoadVariables action. Take a look at the included app samples "LoadVars" and "ParseVars" too.
Back to the index
The above AlertBox action show to us a message like "The string is 12 characters length", because this is the length of the "Hello world!" string.
The app view "Show" event is fired when an app view is shown.
You can show an app view as a dialog using the ShowDialog action.
Argument name
Argument type
Argument value
Input string
String
Result variable
String
The above AlertBox action show to us a message like "The extracted characters are: Hello".
This action does not change the original string.
To extract characters from the end of the string, use a negative start number.
Argument name
Argument type
Argument value
Input string
String
Start
Number
Length
Number
Result variable
String
Argument name
Argument type
Argument value
Input string
String
Algorithm
String
Result variable
String
Argument name
Argument type
Argument value
Input string
String
Key
String
Algorithm
String
Result variable
String
Argument name
Argument type
Argument value
Input string
String
Result variable
Number
Hello world!
" "[Result]"
Argument name
Argument type
Argument value
Input string
String
Result variable
String
The above AlertBox action show to us a message like "true" and our "[MyVar]" Array variable contains three elements: "Peter", "Donald" and
"Walter".
Argument name
Argument type
Argument value
Input string
String
Separator
String
Result variable
String
Argument name
Argument type
Argument value
Input string
String
Result variable
String
Argument name
Argument type
Argument value
Input string
String
Result variable
String
Argument name
Argument type
Argument value
Input string
String
Search query
String
Result variable
String
The above AlertBox action show to us a message like "Hello there world!".
This action is case sensitive, then it's not the same to search for an "a" that an "A".
Argument name
Argument type
Argument value
Input string
String
Search query
String
Replacement
String
Result variable
String
The above AlertBox action show to us a message like "Hello there there!".
This action is case sensitive, then it's not the same to search for an "a" that an "A".
Argument name
Argument type
Argument value
Input string
String
Search query
String
Replacement
String
Result variable
String
Argument name
Argument type
Argument value
Input string
String
Result variable
String
Argument name
Argument type
Argument value
Input string
String
Result variable
String
We don't need to encode all the URL, but the parts who proceed from the user input, for example:
// Our Request URL
HttpExecute "HttpClient1"
Argument name
Argument type
Argument value
Input string
String
Result variable
String
Argument name
Argument type
Argument value
Input string
String
Result variable
String
Argument name
Argument type
Argument value
Array or Object
Array|Object
Result variable
String
Argument name
Argument type
Argument value
Input string
String
Result variable
Array|Object
Argument name
Argument type
Argument value
Input string
String
Result variable
String
Argument name
Argument type
Argument value
Input string
String
Result variable
String
Argument name
Argument type
Argument value
Input string
String
Result variable
String
Argument name
Argument type
Argument value
Input string
String
Result variable
String
Argument name
Argument type
Argument value
Input string
String
Result variable
String
Argument name
Argument type
Argument value
Input string
String
Result variable
String
Argument name
Argument type
Argument value
Input string
String
Result variable
String
Argument name
Argument type
Argument value
Input string
String
Result variable
String
Argument name
Argument type
Argument value
Input string
String
Result variable
String
Argument name
Argument type
Argument value
Input string
String
Result variable
String
Argument name
Argument type
Argument value
Input string
String
Result variable
String
Argument name
Argument type
Argument value
Input string
String
Result variable
String
Argument name
Argument type
Argument value
Input string
String
Result variable
String
Argument name
Argument type
Argument value
Input string
String
Result variable
String
Argument name
Argument type
Argument value
Input string
String
Result variable
String
Argument name
Argument type
Argument value
String
Array name
Argument name
Argument type
Argument value
Array name
String
Result variable
String
Argument name
Argument type
Argument value
Array name
String
Argument name
Argument type
Argument value
Array name
String
Result variable
String
Argument name
Argument type
Argument value
Array name
String
Result variable
String
Argument name
Argument type
Argument value
Array name
String
Item value
Mixed
Argument name
Argument type
Argument value
Array name
String
Item value
Mixed
Argument name
Argument type
Argument value
String
String
Result variable
String
Argument name
Argument type
Argument value
Array name
String
Item index
Number
Result variable
String
Argument name
Argument type
Argument value
Array name
String
Item index
Number
Item value
Mixed
Argument name
Argument type
Argument value
Array name
String
Item index
Number
Argument name
Argument type
Argument value
Array name
String
Argument name
Argument type
Argument value
Array name
String
Argument name
Argument type
Argument value
Array name
String
Argument name
Argument type
Argument value
Array name
String
Argument name
Argument type
Argument value
Array name
String
Argument name
Argument type
Argument value
Array name
String
Searches the specified array from the beginning for the specified item value, and store its position index in the specified result variable or -1 if not
found.
You can searches from the end of an Array using the ArrayLastIndexOf action.
Argument name
Argument type
Argument value
Array name
String
Result variable
Mixed
Argument name
Argument type
Argument value
Array name
String
Result variable
Mixed
Argument name
Argument type
Argument value
Object name
String
Argument name
Argument type
Argument value
Object name
String
Property name
String
Property value
String
Argument name
Argument type
Argument value
Object name
String
Property name
String
Result variable
String
// [MyDate] store the 2100 year, 12 month and 5 day date, time part is set as zeroes
// [MyDate] store the same than above because non-alphanumeric characters are ignored
The parsing tokens in the Format argument are similar to the formatting tokens used in DateFormat action.
Year, month, and day tokens
Input
Example
Description
YYYY
2014
4 or 2 digit year
YY
14
2 digit year
1..4
M MM
1..12
Month number
MMM MMMM
Jan..December
D DD
1..31
Day of month
Do
1st..31st
Input
Example
Description
DDD DDDD
1..365
Day of year
1410715640.579
Unix timestamp
1410715640579
Unix ms timestamp
Input
Example
Description
gggg
2014
gg
14
Input
Example
Description
w ww
1..53
1..7
ddd dddd
Mon...Sunday
GGGG
2014
GG
14
W WW
1..53
1..7
Input
Example
Description
H HH
0..23
24 hour time
h hh
1..12
a A
am pm
m mm
0..59
Minutes
s ss
0..59
Seconds
0..9
Tenths of a second
SS
0..99
Hundreds of a second
Input
Example
Description
SSS
0..999
Thousandths of a second
SSSS
0000..9999
fractional seconds
Z ZZ
+12:00
Argument name
Argument type
Argument value
Value
String|Number
Format
String
Result variable
String
Argument name
Argument type
Argument value
Date variable
Date
Result variable
String
Month
Token
Output
1 2 ... 11 12
Mo
MM
01 02 ... 11 12
MMM
MMMM
Quarter
1234
Day of Month
1 2 ... 30 31
Do
DD
01 02 ... 30 31
Day of Year
Day of Week
DDD
DDDo
DDDD
0 1 ... 5 6
do
dd
Su Mo ... Fr Sa
ddd
dddd
0 1 ... 5 6
1 2 ... 6 7
Week of Year
1 2 ... 52 53
wo
ww
01 02 ... 52 53
1 2 ... 52 53
Wo
WW
01 02 ... 52 53
Year
Week Year
AM/PM
YY
70 71 ... 29 30
YYYY
gg
70 71 ... 29 30
gggg
GG
70 71 ... 29 30
GGGG
AM PM
am pm
Hour
Minute
Second
0 1 ... 22 23
HH
00 01 ... 22 23
1 2 ... 11 12
hh
01 02 ... 11 12
0 1 ... 58 59
mm
00 01 ... 58 59
0 1 ... 58 59
ss
00 01 ... 58 59
0 1 ... 8 9
SS
00 01 ... 98 99
SSS
SSSS ...
SSSSSSSSS
ZZ
Unix Timestamp
1360013296
1360013296123
Fractional Second
Argument name
Argument type
Argument value
Date variable
Date
Format
String
Result variable
String
Store the Date variable formatted following the specified format string
Argument name
Argument type
Argument value
Date variable
Date
Unit
String
One of these possible values: year, month, day, hour, minute, second, millisecond
Result variable
Number
Argument name
Argument type
Argument value
Date variable
Date
Unit
String
One of these possible values: year, month, day, hour, minute, second, millisecond
Value
Number
Argument name
Argument
type
Argument value
Date variable
Date
Key
String
One of these possible values: years, quarters, months, weeks, days, hours, minutes, seconds, milliseconds
Value
Number
Argument name
Argument
type
Argument value
Date variable
Date
Key
String
One of these possible values: years, quarters, months, weeks, days, hours, minutes, seconds, milliseconds
Value
Number
Argument name
Argument type
Argument value
Date A variable
Date
Date B variable
Date
Unit
String
One of these possible values: year, month, day, hour, minute, second, millisecond
Value
Number
Argument name
Argument type
Argument value
Date variable
Date
Result variable
String
Argument name
Argument type
Argument value
Date variable
Date
Result variable
Array
Argument name
Argument type
Argument value
Date variable
Date
Result variable
Object
Argument name
Argument type
Argument value
Date variable
Date
Result variable
Number
Argument name
Argument type
Argument value
Date variable
Date
Result variable
Number
Argument name
Argument type
Argument value
Date variable
Date
Result variable
Number
Argument name
Argument type
Argument value
Date variable
Date
Result variable
Boolean
DateIsBefore "Date variable A" "Date variable B" "Unit" "Result variable"
Check if a Date variable is before another Date variable. At least the Date variable A argument must be a Date variable created with NewDate action.
The Date variable B argument can be also an string which contains an ISO8601 string confirming the datetime. Such datetime is then compared with
the first argument Date variable.
Argument name
Argument type
Argument value
Date variable A
Date
Date variable B
Date|String
Optional comparison granularity. One of these possible values: year, month, day, hour, minute, second, mi
Unit
String
Leave empty if you do not want any granularity.
Result variable
Boolean
Store "true" if the Date variable A is before the Date variable B, or "false" when not
DateIsSame "Date variable A" "Date variable B" "Unit" "Result variable"
Check if a Date variable is the same as another Date variable. At least the Date variable A argument must be a Date variable created
with NewDate action.
The Date variable B argument can be also an string which contains an ISO8601 string confirming the datetime. Such datetime is then compared with
the first argument Date variable.
Argument name
Argument type
Argument value
Date variable A
Date
Date variable B
Date|String
Optional comparison granularity. One of these possible values: year, month, day, hour, minute, second, mi
Unit
String
Leave empty if you do not want any granularity.
Result variable
Boolean
Store "true" if the Date variable A is the same than the Date variable B, or "false" when not
DateIsAfter "Date variable A" "Date variable B" "Unit" "Result variable"
Check if a Date variable is after another Date variable. At least the Date variable A argument must be a Date variable created with NewDate action.
The Date variable B argument can be also an string which contains an ISO8601 string confirming the datetime. Such datetime is then compared with
the first argument Date variable.
Argument name
Argument type
Argument value
Date variable A
Date
Date variable B
Date|String
Optional comparison granularity. One of these possible values: year, month, day, hour, minute, second, mi
Unit
String
Leave empty if you do not want any granularity.
Result variable
Boolean
Store "true" if the Date variable A is after than the Date variable B, or "false" when not
Argument name
Argument type
Argument value
Option name
String
Option value
String
Use this action to retrieve the value of a previously saved option with the SetOption action.
The option name is case sensitive, then it's not the same if you retrieve "name" and "Name" options.
Argument name
Argument type
Argument value
Option name
String
Result variable
String
The variable to store the retrieve option value or an empty string if the option doesn't exists.
Argument name
Argument type
Argument value
Option name
String
ClearOptions
Use this action to clear all the previously saved options. This action no requires any argument. If you want to remove an specific option use
the RemoveOption action instead.
Back to the index
Argument name
Argument type
Argument value
Key
String
Value
String
Number of days to store the cookie after expire it. Leave empty to create a session cookie,
Days
String
which are expired when the user close the browser.
Argument name
Argument type
Argument value
Key
String
Result variable
String
RemoveCookie "Key"
Use this action to remove a previously established cookie with the SetCookie action.
Argument name
Argument type
Argument value
Key
String
ClearCookies
Use this action to remove all the cookies previously established with the SetCookie action.
Back to the index
Argument name
Argument type
Argument value
Result variable
String
The variable name to store "true" if the cookies are availables or "false" when not.
Argument name
Argument type
Argument value
Message title
String
Message text
String
This action can use the Dialogs Cordova plugin if you wanted. See app options for more information. If you include the plugin with the app, then this
action use the plugin when execute. However, if you do not include the plugin, the action fallback without problems.
Back to the index
Argument name
Argument type
Argument value
Message title
String
Message text
String
A mandatory app function name to be called when the user close the confirm dialog.
Callback
String
The function must have one argument, which is "true" if the user confirm the dialog, or "false"
if the user cancel the dialog.
This action can use the Dialogs Cordova plugin if you wanted. See app options for more information. If you include the plugin with the app, then this
action use the plugin when execute. However, if you do not include the plugin, the action fallback without problems.
Back to the index
Argument name
Argument type
Argument value
Message title
String
Message text
String
Default value
String
An optional value to be show into the dialog input box at the start
A mandatory app function name to be called when the user close the confirm dialog.
The function must have two arguments. The first contains "true" if the user confirm the dialog, or "false"
Callback
String
if the user cancel the dialog. If the first argument contains "true" then the second argument contains the d
input value, that is, what the user provide to us
This action can use the Dialogs Cordova plugin if you wanted. See app options for more information. If you include the plugin with the app, then this
action use the plugin when execute. However, if you do not include the plugin, the action fallback without problems.
Back to the index
This action show an HTML based modal dialog with the message text and the specified background color, which is determined by the alert kind
argument.
Argument name
Argument type
Argument value
Text
String
Kind
String
One of these values: primary, success, info, warning or danger. "info" by default
Take a look at the MessageBox app sample included by App Builder in order to learn how to use this action.
Back to the index
Argument name
Argument type
Argument value
Header
String
Content
String
Buttons
String
One or more button labels (separated by the "|" pipe character). "Ok" by default
Kind
String
One of these values: primary, success, info, warning or danger. "info" by default
An optional app function name to be called when the user press a button of the message box.
Callback
String
The function must have one argument, and, this argument contains 1 if the user press the first button,
2 if the user press the second button, 3 for the third button and so on.
Take a look at the MessageBox app sample included by App Builder in order to learn how to use this action.
Back to the index
Argument name
Argument
type
Argument value
Header
String
Optional header for the input box, for example, "Write your name"
Buttons
String
One or more button labels (separated by the "|" pipe character). "Ok" by default
Default
String
Kind
String
One of these values: primary, success, info, warning or danger. "info" by default
An optional app function name to be called when the user press a button of the message box.
The function must have two arguments. The first argument contains 1 if the user press the first button,
Callback
String
2 if the user press the second button, 3 for the third button and so on.
The second argument store the value of the input box, that is, what the user write into the input box.
Take a look at the InputBox app sample included by App Builder in order to learn how to use this action.
Back to the index
Argument name
Argument type
Argument value
Number of times
Number
This action can use the Dialogs Cordova plugin if you wanted. See app options for more information. If you include the plugin with the app, then this
action use the plugin when execute. However, if you do not include the plugin, the action fallback without problems.
Back to the index
Vibrate "Milliseconds"
Use this action to perform a vibration. In the supported platforms this action cause the device vibration. If your app run in a web browser, instead of a
vibration, this action show a "vibration" using certain CSS animation.
Argument name
Argument type
Argument value
Milliseconds
Number
This action can use the Vibration Cordova plugin if you wanted. See app options for more information. If you include the plugin with the app, then this
action use the plugin when execute. However, if you do not include the plugin, the action fallback without problems (the vibration are replaced by
certain CSS animation).
Back to the index
Argument name
Argument type
Argument value
Math expression
String
Result variable
String
Argument name
Argument type
Argument value
Number
Number
Number to be passed
Result variable
String
The variable name to store a number, representing the absolute value of the specified number
Dec "Variable"
This action decrement by one the specified numeric variable.
Dec "[A]"
Argument name
Argument type
Argument value
Variable
String
Inc "Variable"
This action increment by one the specified numeric variable.
Inc "[A]"
Argument name
Argument type
Argument value
Variable
String
Argument name
Argument type
Argument value
Number
Number
Number to be passed
Result variable
String
Argument name
Argument type
Argument value
Base number
Number
Exponent number
Number
Number to be passed
Result variable
String
The variable name to store a number, representing the value of x to the power of y (xy)
Argument name
Argument
type
Argument value
Number
Number
Number to be passed
Result variable
String
The variable name to store a number, representing the natural logarithm of a specified number
Argument name
Argument type
Argument value
Number
Number
Number to be passed
Result variable
String
The variable name to store a number, from -1 to 1, representing the cosine of an angle
Argument name
Argument type
Argument value
Number
Number
Number to be passed
Result variable
Argument name
Argument type
Argument value
Number
Number
Number to be passed
Result variable
String
The variable name to store a number, from -1 to 1, representing the sine of an angle
Argument name
Argument type
Argument value
Number
Number
Number to be passed
Result variable
String
Argument name
Argument type
Argument value
Number
Number
Result variable
String
Argument name
Argument type
Argument value
Number
Number
Number to be passed
Result variable
String
Argument name
Argument type
Argument value
Y coordinate
Number
X coordinate
Number
Result variable
String
Argument name
Argument type
Argument value
Number
Number
Number to be passed
Result variable
String
Argument name
Argument type
Argument value
Number
Number
Number to be rounded
Result variable
String
Argument name
Argument type
Argument value
Number
Number
Number to be rounded
Result variable
String
Argument name
Argument type
Argument value
Number
Number
Number to be rounded
Result variable
String
Argument name
Argument type
Argument value
Result variable
String
If you wanted a random number from a range of numbers the RandomEx action is for you.
Back to the index
Argument name
Argument type
Argument value
Min number
Number
Max number
Number
Result variable
String
If you wanted just a random number maybe the Random action can be useful to you.
Back to the index
EndIf
The above AlertBox action only being executed if the variable "[UserName]" contains the word "Peter". In any other case the "AlertBox" are not
executed.
The first and second statements can be an string or a number. The operator must be one of this possible values:
Operator
Mean
==
===
First statement is equal valud and variable type than the second
!=
!==
First statement is not equal in valur or variable type than the second
>
<
>=
<=
You must use the EndIf action in order to properly close an "If" action, an Else action or an ElseIf action.
If you wanted to evaluate more than one condition at the same time the IfEx action exists at your disposition.
Argument name
Argument type
Argument value
First statement
Mixed
Operator
String
Second statement
Mixed
IfEx "Condition(s)"
This action is a little more advanced than the If action and allow us to evaluate more than one condition at the same time. You can use the same
comparison operators than with the If action and compare the conditions using the below logical operators.
Logical operators
Mean
&&
AND
||
OR
NOT
Else
EndIf
Else
EndIf
If you wanted to evaluate just one condition at the same time the If action is for you.
Argument name
Argument type
Argument value
Condition(s)
String
Else
Use this action when you want a workflow bifurcation after an If action or an ElseIf action. This action doesn't require any argument, but need to be
used only in conjunction the refered actions and never alone.
As an example, consider the code sample of the "If" action, in which we salute to "Peter" if it's the current user name of our app. Then this code:
If "[UserName]" "==" "Peter"
Else
EndIf
In the above script, if the variable "[UserName]" is contains the string "Peter", the first AlertBox action being executed and the message "Hello Peter!"
appear to us. However, if the variable "[UserName]" is not equal to "Peter", then the second "AlertBox" is being executed and we receive the
message "Hello you!", since we use the "Else" action.
You must use the EndIf action in order to properly close an "If" action, an "Else" action or an ElseIf action.
Back to the index
Else
EndIf
As you can see above we use a combination of the If action, the "ElseIf" action and the Else action. If the variable "[UserName]" contains the string
"Peter", then the right AlertBox action being executed and we receive the message "Hello Peter!". However, if the variable "[UserName]" contains
"James", we receive the message "Hello James!", and, if any other case, we receive the message "Hello you!".
The first and second statements can be an string or a number. The operator must be one of this possible values:
Operator
Mean
==
===
First statement is equal valud and variable type than the second
!=
!==
First statement is not equal in valur or variable type than the second
>
<
>=
<=
You must use the EndIf action in order to properly close an "ElseIf" action or an Else action.
Argument name
Argument type
Argument value
First statement
Mixed
Operator
String
Second statement
Mixed
EndIf
Use this action to close an script block starting by an If action, an ElseIf action or an Else action. This action doesn't require any argument, but need
to be used only in conjunction the refered actions and never alone.
If you write something like the bellow script code:
If "[UserName]" "==" "Peter"
... an error probably occur. We need to close the If action with their pair "EndIf":
If "[UserName]" "==" "Peter"
EndIf
You must use the EndIf action in order to properly close an If action, but also an Else action or an ElseIf action.
Back to the index
EndWhile
First we set a variable "[Text]" as an empty string. Then we retrieve the length of such string, which is zero at the first moment. Then we prepare a
"While" action in order to execute the next code until the "[TextLen]" variable is less than "10".
After that we append an "A" character to the "[Text]" variable, and, again we get the length of the "[Text]" variable. The code is executed over and
over again until our condition is reached (until the "[TextLen]" variable is less than "10", then we exit the while and the AlertBox action show us a
message like "AAAAAAAAAA", in other words, "10" A.
The first and second statements can be an string or a number. The operator must be one of this possible values:
Operator
Mean
==
!=
>
<
>=
<=
You must need to assert that your condition allow to exit the while in some moment and/or use the Break action to exit the while, in order to avoid an
"infinite" while, which can cause problems in your app.
A "While" script code block need to be closed by using the EndWhile action.
Argument name
Argument type
Argument value
First statement
Mixed
Operator
String
Second statement
Mixed
EndWhile
You need to use this action when before start a code block with the While action. This action doesn't require any argument. If you write something
like the bellow script code:
SetVar "[Text]" "" "String"
... an error probably occur. We need to close the While action with their pair "EndWhile":
SetVar "[Text]" "" "String"
EndWhile
EndLoop
First we set a variable "[Text]" as an empty string. Then we prepare a "Loop" action in order to execute their block code 10 times: from 1 to 10. Finally
the AlertBox action show us a message like "AAAAAAAAAA", in other words, "10" A. Note we no use the "[LoopCount]" variable, which are
incremented in every loop, containing "1", "2", "3", "4", etc., and finally "10".
After that we append an "A" character to the "[Text]" variable, and, again we get the length of the "[Text]" variable. The code is executed over and
over again until our condition is reached (until the "[TextLen]" variable is less than "10", then we exit the while and the AlertBox action show us a
message like "AAAAAAAAAA", in other words, "10" A.
A "Loop" script code block need to be closed by using the EndLoop action.
Argument name
Argument type
Argument value
Start number
Number
End number
Number
Loop variable
String
EndLoop
You need to use this action when before start a code block with the Loop action. This action doesn't require any argument. If you write something like
the bellow script code:
SetVar "[Text]" "" "String"
... an error probably occur. We need to close the Loop action with their pair "EndLoop":
SetVar "[Text]" "" "String"
EndLoop
Break
This action can be used inside a While action block or a Loop action block to inmediatly exit the while or the loop. This action doesn't require any
argument.
Back to the index
Sleep "Milliseconds"
This action cause the sleep of the app script for the specified milliseconds. Use this action carefully since they freeze your apps the specified
milliseconds.
Argument name
Argument type
Argument value
Milliseconds
Number
Milliseconds to be sleeped
Argument name
Argument type
Argument value
Return value
Mixed
Variable type
String|Number|Boolean
Exit
The Exit action can be used to exit the current script block, without execute any next possible actions.
Back to the index
Argument name
Argument type
Argument value
Result variable
String
This action can use the Device Cordova plugin if you wanted. See app options for more information. If you include the plugin with the app, then this
action use the plugin when execute. However, if you do not include the plugin, the action fallback without problems (use web browser provided
information).
Back to the index
Use this action to retrieve the name of the device model or product in which your app is running. The value is set by the device manufacturer and
may be different across versions of the same product. If your app is running on a web browser this action return the web browser code name as is
defined in the "navigator" JavaScript variable.
Argument name
Argument type
Argument value
Result variable
String
This action can use the Device Cordova plugin if you wanted. See app options for more information. If you include the plugin with the app, then this
action use the plugin when execute. However, if you do not include the plugin, the action fallback without problems (use web browser provided
information).
Back to the index
Argument name
Argument type
Argument value
Result variable
String
This action can use the Device Cordova plugin if you wanted. See app options for more information. If you include the plugin with the app, then this
action use the plugin when execute. However, if you do not include the plugin, the action fallback without problems (use web browser provided
information).
Back to the index
Argument name
Argument type
Argument value
Result variable
String
This action can use the Device Cordova plugin if you wanted. See app options for more information. If you include the plugin with the app, then this
action use the plugin when execute. However, if you do not include the plugin, the action fallback without problems (use web browser provided
information).
Back to the index
Argument name
Argument type
Argument value
Timer name
String
Use this action to stop the execution of the specified Timer control. Once you execute this action the Timer control Interval event are no more fired.
Argument name
Argument type
Argument value
Timer name
String
Argument name
Argument type
Argument value
Timer name
String
Timer interval
Number
Argument name
Argument type
Argument value
Watcher name
String
Argument name
Argument type
Argument value
Watcher name
String
Argument name
Argument type
Argument value
Watcher name
String
Variable name
String
Argument name
Argument type
Argument value
Share name
String
Argument name
Argument type
Argument value
Object name
String
The object variable you must to provide must have the optional or mandatory properties described in the below table. Note that properties names are
in lowercase.
Property name
Property type
Property value
url
String
via
String
text
String
media
String
caption
String
hashtags
String
Optional. One of these values: vk, digg, buffer, reddit, tumblr, twitter, meneame, linkedin, facebook,
provider
String
google+, pinterest, delicious or stumbleupon. "facebook" by default.
width
String
height
String
toolbar
String
resizable
String
scrollbars
String
ShareByObject "ShareInfo"
... which share the App Builder URL in Facebook. We can set other object variable properties in order to use more information and/or when use other
providers.
Back to the index
Argument name
Argument type
Argument value
Request URL
String
Result variable
String
Argument name
Argument type
Argument value
Request URL
String
Post data
String
Result variable
String
Argument name
Argument type
Argument value
HTTP Client
String
Argument name
Argument type
Argument value
HTTP Client
String
Request URL
String
This action set the request HTTP method for the specified HTTP Client control. You can establish a request method from the HTTP Client control
Method property, but can use this action to set a new one if you wanted.
Take a look at the App Builder included Http Client app sample, in which this action is used along other Http* actions.
Argument name
Argument type
Argument value
HTTP Client
String
Request method
String
Argument name
Argument type
Argument value
HTTP Client
String
Key name
String
Key value
Mixed
Argument name
Argument type
Argument value
HTTP Client
String
Argument name
Argument type
Argument value
HTTP Client
String
Result variable
String
If you receive an status equals to "0" (zero) this generally mean the HTTP response is empty. Remember you need to enable CORS (Cross-Origin
Resource Sharing) in your server. Take a look at this website, which show us how to enable CORS in various kind of servers and scripting languages
like PHP.
Back to the index
Argument name
Argument type
Argument value
HTTP Client
String
Result variable
String
Argument name
Argument type
Argument value
HTTP Client
String
Result variable
String
Argument name
Argument type
Argument value
Pusher name
String
Argument name
Argument type
Argument value
Pusher name
String
Argument name
Argument type
Argument value
WebSocket name
String
Argument name
Argument type
Argument value
WebSocket name
String
Message
String
Argument name
Argument type
Argument value
WebSocket name
String
Argument name
Argument type
Argument value
Media player
String
Argument name
Argument type
Argument value
Media player
String
Argument name
Argument type
Argument value
Media player
String
Argument name
Argument type
Argument value
Media player
String
Property name
String
Result variable
String
Property name
Returned value
isReady
isBuffering
isCompleted
"true" if the media player has been completed or "false" when not
isFullScreen
currentState
currentTime
totalTime
timeLeft
volume
Argument name
Argument type
Argument value
Media player
String
Media player
Number
Argument name
Argument type
Argument value
Media player
String
Media player
Number
Argument name
Argument type
Argument value
Media player
String
Media player
Number
Use this action to toggle the full screen state of the specified MediaPlayer control.
Argument name
Argument type
Argument value
Media player
String
MediaSetSource "Media Player" "OGG source" "MP4 source" "Webm source" "3GP source"
Use this action to set the media source files to the specified MediaPlayer control. You can use one or more sources URL to the differents media files
format. Think that the media player control use the supported media file format depending on the platform in which your app is running.
Argument name
Argument type
Argument value
Media player
String
OGG source
String
MP4 source
String
Webm source
String
3GP source
String
Argument name
Argument type
Argument value
Media player
String
Argument name
Argument type
Argument value
Media player
String
Argument name
Argument type
Argument value
MP3 source
String
OGG source
String
Argument name
Argument type
Argument value
URL
String
String
"true" if you want to show a location bar in the window or an empty string when not
Result variable
String
This action can use the Browser Cordova plugin if you wanted. See app options for more information. If you include the plugin with the app, then this
action use the plugin when execute. However, if you do not include the plugin, the action fallback without problems (use the right browser window's
method instead).
You can use the CloseWindow action to close a window opened by this action.
Back to the index
Argument name
Argument type
Argument value
Window variable
String
This action can use the Browser Cordova plugin if you wanted. See app options for more information. If you include the plugin with the app, then this
action use the plugin when execute. However, if you do not include the plugin, the action fallback without problems (use the right browser window's
method instead).
Back to the index
Argument name
Argument type
Argument value
Location name
String
Note this action doesn't retrieve the information of the device location automatically, but you need to wait for the Succes or Error events of
the Location control.
Back to the index
Argument name
Argument type
Argument value
Motion name
String
Note this action doesn't retrieve the information of the device motion automatically, but you need to wait for the Succes or Error events of the Motion
control.
Argument name
Argument type
Argument value
Compass name
String
Note this action doesn't retrieve the information of the device compass automatically, but you need to wait for the Succes or Error events of
the Compass control.
Back to the index
StartJS
This action is indented to advanced users who want to use pure JavaScript code inside their App Builder scripts. This action doesn't require any
argument. Just put this action in an App Builder script and, all the following code are treated by the App Builder compiler as pure JavaScript code.
As an example, consider the below code, in which we start and end the JavaScript block of code and use a JavaScript native function ("alert") in that
source block.
StartJS
alert('Hello world!');
EndJS
You must use the EndJS action in order to properly close a block of code starting by an "StartJS" action.
Back to the index
EndJS
Use this action to properly close a block of code started by the StartJS action.
If you write a script code like this:
StartJS
alert('Hello world!');
... we get unexpected results, since the "AlertBox" action is considered as pure JavaScript code, and doesn't recognized by the App Builder compiler
as an App Builder action. Then remember to close any "StartJS" action with the pair "EndJS", just like in the below code:
StartJS
alert('Hello world!');
EndJS
ApplyModel
Use this action to inform the app model that some changes has been made. In very rare scenarios AngularJS, the Javascript framework behind App
Builder, need to be informed about some changes in the model of our apps. This action is intended to do that.
A possible scenario to use this action can be if we use the Location control Success event in order to set the URL of an IFrame control. In such
scenario we need to call to this action after set the URL variable.
Back to the index
ThrowError
Throw a Javascript error and stop the execution of the subsequent actions, but fire the app Error event.
Take a look at the "[App.LastError]" in global variables.
Back to the index
Argument name
Argument type
Argument value
Camera name
String
Note this action doesn't retrieve the image data automatically, but you need to wait for the Succes or Error events of the Camera control.
Back to the index
BarcodeScan
This action start the process to scan a barcode. This action must be used in conjunction with the Barcode control. Carefully read this control help for
details.
A Barcode app sample is included with App Builder! Take a look too!
Back to the index
Retrieve the device's connection type. This action requires that our application include the Network plugin for Apache Cordova. Take a look also at
the [App.Online] global variable.
Argument name
Argument
type
Argument value
Result variable
String
This variable can store one of these possible values: "unknown", "ethernet", "wifi", "2g", "3g", "4g", "cellular" or "none
Argument
name
Argument
type
Argument value
File name
String
The file name to be write, for example, "MyFile.txt". If such file do not exists into the application's data storage directory th
Contents
String
Error callback
String
An application's function name in order to be called if an error occur. You must create an application function with one arg
error codes' table.
Success
callback
String
An application's function name in order to be called when the file are write. You must create an application function with n
Code
Description
Security error
Operation aborted
Not readable
Code
Description
Encoding error
No modification allowed
Invalid state
Syntax error
Invalid modification
10
Quota exceeded
11
Code
Description
12
Argument
name
Argument
type
Argument value
File name
String
The file name to be write, for example, "MyFile.txt". If such file do not exists into the application's data storage directory th
Contents
String
Error callback
String
An application's function name in order to be called if an error occur. You must create an application function with one arg
error codes' table.
Success
callback
String
An application's function name in order to be called when the file are write. You must create an application function with n
Code
Description
Security error
Operation aborted
Not readable
Encoding error
Code
Description
No modification allowed
Invalid state
Syntax error
Invalid modification
10
Quota exceeded
11
12
Argument
name
Argument
type
Argument value
Directory
String
Determine the directory in which the specified file resides. This can be one of these possible values: "dataDirectory", "applicationDire
File name
String
The file name path to be read. When use the "applicationDirectory" directory we must specify the relative path of the file to be read. F
named "Sample.txt" in our application, this file is placed into the directory "/www/app/files/Sample.txt", and this is the path to be use
this action.
Error
callback
String
An application's function name in order to be called if an error occur. You must create an application function with one argument, wh
below the error codes' table.
Success
callback
String
An application's function name in order to be called when the file are write. You must create an application function with one argume
from the file.
Code
Description
Security error
Operation aborted
Not readable
Encoding error
No modification allowed
Invalid state
Code
Description
Syntax error
Invalid modification
10
Quota exceeded
11
12
Argument name
Argument type
Argument value
Variable name
String
Argument name
Argument type
Argument value
Text
String
Kind
String
Determine the kind of the message and can be one of these values: "info", "warning" or "error".
Argument name
Argument type
Argument value
Launcher name
String
App ID
String
For Android an app ID can be, for example, "com.twitter.android". For iOS an app ID can be, for example, "twitter://".
Back to the index
Argument name
Argument type
Argument value
Launcher name
String
App ID
String
For Android an app ID can be, for example, "com.twitter.android". For iOS an app ID can be, for example, "twitter://".
Back to the index
Argument name
Argument type
Argument value
Launcher name
String
Action
String
Argument
String