8. Designer Variable Blocks

Home/Warehouse Insight/App Designer/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 outline each available variable block type and provide a brief example of how the block can be used.

Variable

Variable 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 (e.g., decimal, string, and Boolean) but 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 dropdown to select a previously-created variable or to create a new one.

Variable Example

The Application Designer example below uses Variable to reference a PDA Configuration context variable:

Form Opens

Set Variable

Set Variable is used to set the value of a variable. If the variable does not already exist, it is created.

Set Item

Block Configuration:

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

Set Variable Example

The Application Designer example below uses Set Variable to create a new custom variable:

Form Opens

Integer Variable

Integer Variable 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

The Application Designer example below uses Integer Variable:

Form Opens

Text Variable

Text Variable 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

When used with an Expression block or input, Text Variable replaces any variables enclosed in brackets with the current value.

Text Variable Example

The Application Designer example below uses Text Variable:

Form Opens

Boolean Variable

Use Boolean to indicate a True or False variable.

True

Boolean Example

The Application Designer example below uses Boolean:

Form Opens

Known Event Variable

Use Known Event to choose a pre-existing Event ID by name. The Known Event options are automatically populated based on Events page in Business Central.

Nothing Yet

The known event options are automatically populated based on the Events page in Business Central.

Known Event Example

The Application Designer example below uses Known Event:

Loading Document Data

Dialog Result Variable

Use Dialog Result 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)

Dialog Result Example

The Application Designer example below uses Dialog Result:

Form Opens

Evaluate Number

Evaluate Number 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

The Application Designer example below uses Evaluate Number:

Form Opens

Evaluate Text

Evaluate Text 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

The Application Designer example below uses Evaluate Text:

Form Opens

Is any lot tracked

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

Lot Tracked

Is any lot tracked Example

The Application Designer example below uses Is any lot tracked:

Scanned Item

Is any serial tracked

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

Serial Tracked

Is any serial tracked Example

The Application Designer example below uses Is any serial tracked:

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?
Please submit the reason for your vote so that we can improve the article.
Need help?

Leave A Comment

Go to Top