8. Designer Variable Blocks

Home/8. Designer Variable Blocks

8. Designer Variable Blocks

You are here:

The designer variable blocks serve as defined variables in the application to make it easier to work with data and control process logic.

The following sections will outline each available variable block type and provide a brief example of how the block can be used.

Note: Variables are global to the entire application so can be referenced at any time and consequently do not go “out of scope”.

Variable

The “Variable” block is used to define an explicit variable.  You can either define a new variable or reference one of the available variables in the context.  Variables can be of any type (decimal, string, Boolean) but by default are treated as strings.

Item

This block is always used as an Input to another block and cannot be placed by itself.

Block Configuration:

Option Description
item The variable name.  Use the drop down to select a previously created variable or to create a new one.
Note: If you wish to initialize a new variable but not immediately use it, use the “Set Variable” block.

Variable Example

Provided below is an example of using the “Variable” block to reference a PDA Configuration context variable.

Application Designer:

Form Opens

Set Variable

The “Set Variable” block is used to set the value of a variable.  If the variable does not already exist it will be created.

Set Item

Block Configuration:

Option Description
item The variable name to set.  Use the drop down to select a previously created variable or to create a new one.
<blank> Place a variable block to get the value from

Set Variable Example

Provided below is an example of using the “Set Variable” block to create a new custom variable.

Application Designer:

Form Opens

Integer Variable

The “Integer Variable” block can be used as an input into another block when you need to specify an integer value and do not need to reference it anywhere else.

0

Integer Variable Example

Provided below is an example of using the “Integer Variable” block.

Application Designer:

Form Opens

Text Variable

The “Text Variable” block can be used as an input into another block when you need to specify a string value and do not need to reference it anywhere else.

Input

The “Text Variable” when used in conjunction with an Expression block or input will replace any variables enclosed in brackets with the current value.

Note: See the “Evaluate Text” and “Evaluate Number” for examples of using the text variable with expressions.

Text Variable Example

Provided below is an example of using the “Text Variable” block.

Application Designer:

Form Opens

Boolean Variable

Use the “Boolean” block to indicate a True or False variable.

True

Boolean Example

Provided below is an example of using the “Boolean” block. 

Form Opens

Known Event Variable

Use the “Known Event” block to choose a pre-existing Event ID by name.

Nothing Yet

The known event options are automatically populated based on the “Events” page in NAV.

Known Event Example

Provided below is an example of using the “Known Event” block.

Loading Document Data

Dialog Result Variable

Use the “Dialog Result” block to check for a dialog result by name rather than integer.

OK

Available options are:

  • OK (integer value of 1)
  • Cancel (integer value of 2)
  • Yes (integer value of 6)
  • No (integer value of 7)
Note: This variable is typed to the ‘dialog_result’ returned by the various interaction blocks.

Dialog Result Example

Provided below is an example of using the “Dialog Result” block.

Form Opens

Evaluate Number

The “Evaluate Number” block is used to complete simple math expressions and then feed the result into other inputs.

Evaluate Number

Block Configuration:

Option Description
Expression

The expression to evaluate.  Should be a string variable with references to variable names inside brackets [].

Use: “+” for addition, “-“ for subtraction, “*” for multiplication, “/” for division

Evaluate Number Example

Provided below is an example of using the “Evaluate Number” block.

Application Designer:

Form Opens

Evaluate Text

The “Evaluate Text” block is used to string replace variables into text expressions and then feed the result into other inputs.

Evaluate Text

Block Configuration:

Option Description
Expression The expression to evaluate.  Should be a string variable with references to variable names inside brackets [].

Evaluate Text Example

Provided below is an example of using the “Evaluate Text” block.

Application Designer:

Form Opens

Is any lot tracked

The “Is any lot tracked” variable is specially designed to return True/False if the current context has any Item Tracking Configuration that requires a lot number.

Lot Tracked
Note: Specific item tracking settings (e.g. purchase inbound, sales outbound) can also be referenced from the context.

Is any lot tracked Example

Provided below is an example of using the “Is any lot tracked” block.

Application Designer:

Scanned Item

Is any serial tracked

The “Is any serial tracked” variable is specially designed to return True/False if the current context has any Item Tracking Configuration that requires a serial number.

Serial Tracked
Note: Specific item tracking settings (e.g. purchase inbound, sales outbound) can also be referenced from the context.

Is any serial tracked Example

Provided below is an example of using the “Is any serial tracked” block.

Application Designer:

Scanned Item
Was this article helpful?
0 out of 5 stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we improve this article?
Need help?

Leave A Comment

Go to Top