5. Designer Interaction Blocks

Home/5. Designer Interaction Blocks

5. Designer Interaction Blocks

You are here:

The designer interactions are generally user interfaces designed to show information to the user or to gather feedback (input dialogs, quantity dialogs, message boxes, etc).  The interface presented for the most part cannot be further customized but may present slightly differently depending on the operating system running Warehouse Insight.

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

Ask for a Date

The “Ask for a Date” block is used to display a dialog to the user asking for a date.

Ask for a Date

Block Configuration:

Option Description
Title The title for the dialog
Prompt The prompt or message to display to the user
Date Format The date format to force the date to.  If not specified it will use the format of the device.  E.g dd/MM/yy
Default Date The default date to select.  If not specified the current date will be selected.

When executed users will see a dialog similar to this:

Android Emulator

When closed the user will still need to press ‘OK’ again to accept the value previously selected.

Android Emulator

After execution the following variables will be set:

  • dialog_result
    • Will be “0” if “Cancel” pressed, “1” if “OK” pressed
  • action_result
    • Will contain the date entered as displayed
  • date_universal
    • Will contain the date formatted to universal full date/time format
Note: The time portion will always be midnight.

Ask for a Date Example

Provided below is an example of using the “Ask for a Date” block.

Application Designer:

Form Opens

Ask for a Number

The “Ask for a Number” block is used to display a dialog to the user asking for a simple number value.  The dialog does not factor in units of measure or have abilities to limit to integers specifically.

Ask for a Number

Block Configuration:

Option Description
Title The title for the dialog
Prompt The prompt to display to the user
Default Value The initial value for the dialog
Min The minimum value allowed to be entered
Max The maximum value allowed to be entered
Allow Decimals True if decimals should be allowed, false if only integers
Note: The number of decimal places (if allowed) will be limited as per usual based on the handheld configuration settings.

When executed users will see a dialog similar to this:

Android Emulator

After execution the following variables will be set:

  • dialog_result
    • Will be “0” if “Cancel” pressed, “1” if “OK” pressed
  • action_result
    • Will contain the value entered

Ask for a Number Example

Provided below is an example of using the “Ask for a Number” block.

Application Designer:

Form Opens

Ask for Confirmation

The “Ask for Confirmation” block is used to display a dialog to the user asking for confirmation (yes/no).

Ask for Confirmation

Block Configuration:

Option Description
Title The title for the dialog.  If this value is left blank a standard Confirm title will be used.
Message The confirmation message to display to the user.

When executed users will see a dialog similar to this:

Android Emulator

After execution the following variables will be set:

  • dialog_result
    • Will be “7” if “No” pressed, “6” if “Yes” pressed

Ask for Confirmation Example

Provided below is an example of using the “Ask for Confirmation” block. 

Application Designer:

Form Opens

Ask for Text

The “Ask for a Text” block is used to display a dialog to the user asking for a text value.

Ask for Text

Block Configuration:

Option Description
Title The title for the dialog
Prompt The prompt to display to the user
Default Value The initial value to display when the dialog opens
Max Length The maximum text length that can be entered
Close on Barcode Scan Yes – if a barcode is scanned the dialog will be closed
No – if a barcode is scanned the dialog will not be closed automatically

When executed users will see a dialog similar to this:

Android Emulator

After execution the following variables will be set:

  • dialog_result_int
    • Will be “0” if “Cancel” pressed, “1” if “OK” pressed
  • action_result
    • Will contain the value entered

Ask for Text Example

Provided below is an example of using the “Ask for Text block.

Application Designer:

Form Opens

Capture Signature

The “Capture Signature” block is used to display a dialog to the user asking for a signature.  The signature data must still be processed/handled in NAV.

Capture Signature

Block Configuration:

Option Description
Require Name

Use True if the user must also type in the users name prior to closing the signature dialog.  Use False if the requirement to type in the user name is optional.

If not specified the default will be False.

When executed users will see a dialog similar to this:

Android Emulator

After execution the following variables will be set:

  • dialog_result
    • Will be “0” if “Cancel” pressed, “1” if “OK” pressed
  • signature_name
    • Will contain the name typed in
  • blob
    • The signature data

Capture Signature Example

Provided below is an example of using the “Capture Signature” block.  The first part indicates the minimal Application Designer block sequences required.  The second part takes the signature and saves the image to the file system based on the user name that was entered.

Application Designer:

Form Opens

NAV Code:

Code

Choose From List

The “Choose From List” block is used to display a dialog to the user asking for selection from a dropdown/picker control.

Choose From List

Block Configuration:

Option Description
Title The title for the dialog
Prompt The prompt to display to the user
Options A comma separated string of options available
Default The option to select by default.  If none specified the first option will be selected.

When executed users will see a dialog similar to this:

Android Emulator

Selecting the entry will cause the list options to appear:

Android Emulator

After execution the following variables will be set:

  • dialog_result
    • Will be “0” if “Cancel” pressed, “1” if “OK” pressed
  • selection
    • Will be the index of the selection made (0 being the first option)
  • selection_text
    • Will be the text of the selection made

Choose From List Example

Provided below is an example of using the “Choose From List” block. 

Application Designer:

Form Opens

Choose From Table

The “Choose From Table” block is used to display a dialog to the user asking for a selection from grid.

Choose From Table

Block Configuration:

Option Description
Title The title for the dialog.
Prompt The prompt to present to the user
Table ID The table number to retrieve data from
Table Filter The filter to apply to the data results
Table Fields Comma separated list of fields to return
Event ID A NAV event to be executed instead of specify the generic table information

When executed users will see a dialog similar to this:

Android Emulator

After execution the following variables will be set:

  • dialog_result
    • Will be “0” if “Cancel” pressed, “1” if “OK” pressed
  • FieldName
    • Every field on the selected row will be returned with the “FieldName” replaced as needed

Choose From Table Example – Table Filters

Provided below is an example of using the “Choose From Table” block. 

Application Designer:

Form Opens

Choose From Table Example – Event ID

Provided below is an example of using the “Choose From Table” block and a specified Event ID.

Application Designer:

Form Opens

NAV Code:

Code

PDA Columns:

PDA Columns

Choose With Buttons

The “Choose With Buttons” block is used to display a dialog to the user asking for selection from a series of buttons.

Choose With Buttons

Block Configuration:

Option Description
Title The title for the dialog
Prompt The prompt to display to the user
Options A comma separated string of options available

When executed users will see a dialog similar to this:

Android Emulator
Note: A “Cancel” button will always be added as the last available button.

After execution the following variables will be set:

  • dialog_result
    • Will be “0” if “Cancel” pressed, “1” if “OK” pressed
  • selection
    • Will be the index of the selection made (0 being the first option)
  • selection_text
    • Will be the text of the selection made

Choose With Buttons Example

Provided below is an example of using the “Choose With Buttons” block. 

Application Designer:

Form Opens

Display a Message

The “Display a Message” block is used to display a message to the user.

Display a Message

Block Configuration:

Option Description
Title The title for the dialog.  If this value is left blank a standard Message title will be used.
Message The message to display to the user.

When executed users will see a dialog similar to this:

Android Emulator
Note: The dialog is non-blocking.  Therefore any blocks that follow this will be executed even if the message is still being shown.

Display a Message Example

Provided below is an example of using the “Display a Message” block.

Application Designer:

Form Opens

Display an Error

Similar to the “Display a Message” block the “Display an Error” block is used to display a message to the user.  The block may be styled differently depending on the Operating System.  In addition to conveying a message the actual error message will be logged as a “Warning” to the log file.

Display an Error

Block Configuration:

Option Description
Title The title for the dialog.  If this value is left blank a standard Error title will be used.
Message The error to display to the user.

When executed users will see a dialog similar to this:

Android Emulator
Note: The dialog is non-blocking.  Therefore any blocks that follow this will be executed even if the message is still being shown.

Display an Error Example

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

Application Designer:

Form Opens

Editable Panel

The “Editable Panel” allows users to modify a record in a dynamic fashion.  When executed a dialog will be displayed with various editable fields based on the dataset supplied.

Editable Panel

Block Configuration:

Option Description
Title The title to set on the dialog
Prompt The prompt to display to the user
Load Event ID The event in NAV to get the dataset from.  The event must return back a standard dataset.
Save Table View

The filter to apply to the record when saving the data back.  If a filter is applied it will execute event 920 and utilize the PDA columns defined from the Load Event ID to match on. 

If no filter is applied then saving of the results must be handled via code. Panel results will be stored in variables prefixed with ‘setfld’ followed by the field name.

Label Position The position to put the labels on the editable fields.  Specify “Top” if you want the labels to be on top of the editable field.  Specify “Left” if you want the label to be to the left of the editable field.
# of Columns Indicate the number of columns you want to display in the panel.  Minimum 1.

When executed users will see a dialog similar to this:

Android Emulator

The control types and editable states of the panel are controlled via the column definition returned in the dataset.

The field will be editable if there is an Editor specified for the column (TextBox, ComboBox, CheckBox).

The type of editor will depend on the Data Type. 

Option fields should use “ComboBox”.

Text and Decimal fields should use “TextBox” though decimal fields will have a numeric entry.

Boolean fields should use “CheckBox”.

If you do not want the label to be shown but just want the value then set the “Show Caption” to false.

If you don’t want the field to be shown at all then set the “Column Visible” property to false.

Editable Panel Example 1

Provided below is an example of using the “Editable Panel” block while using the automatic saving abilities.  To make use of the automatic saving the “Save Table View” filter must be set.

Application Designer:

Forms Opens

NAV Code:

Code

PDA Columns:

PDA Columns

Example Output:

Android Emulator

Editable Panel Example 2

Provided below is an example of using the “Editable Panel” block and manually saving the results.  Manual saving occurs as a result of not specifying the “Save Table View”.

Application Designer:

Form Opens

NAV Code:

Code

PDA Columns:

PDA Columns

Enter Quantity

The “Enter Quantity” block is used to prompt the user to enter quantity (typically for a selected document line).  The block is tightly tied to Scan Behaviors as well as the menu standard action “Change Qty”.

Enter Quantity

Block Configuration:

Option Description
Require LN

True if the dialog should show a field for the Lot Number.

False if the dialog should hide the Lot Number field (including the lot information button)

Require SN

True if the dialog should show a field for the Serial Number.

False if the dialog should hide the Serial Number field (including the serial information button)

Auto Generate LN/SN True if the dialog should generate a Lot or Serial number if one is not specified.
Label Default Qty. Enter an integer value greater than negative one to include a field on the dialog to enter number of labels to print.  If left blank input field will be hidden.
Using xxx Line

Choose “Existing” to utilize data from the selected line.

Choose “New” to assume no line required/selected.

When the block is executed it will reference the Scan Behaviors to determine the default unit of measure, default quantities and whether to allow excess.

The block also relies on the “Configure Fields” block to determine maximum values and reference field information.

In addition to the published configuration options there are a few variables that can be created/set to help further override the dialog behavior:

Overrides:

Option Description
override_allow_excess If this variable is defined in the application it will override the scan behavior allow excess option.  True to have no maximum value.  False to respect the maximum value.
override_allow_negative If this variable is defined in the application it will override the dialogs default behavior of preventing negative numbers.
override_allow_change_lot If this variable is defined in the application it will determine whether users can change the lot number.  False to prevent changing the lot number.  True to allow changing the lot number.
override_allow_change_serial If this variable is defined in the application it will determine whether users can change the serial number.  False to prevent changing the serial number.  True to allow changing the serial number.
override_allow_change_uom If this variable is defined in the application it will determine whether users can change the unit of measure.  False to prevent changing unit of measure.  True to allow changing unit of measure.
override_allow_change_expiry If this variable is defined in the application it will determine if the expiry date is changeable and shown.  True to allow changing expiry.  False to prevent changing expiry date and the field will be hidden.

When executed users will see a dialog similar to this:

Android Emulator

After execution the following variables will be set:

  • dialog_result
    • Will be “0” if “Cancel” pressed, “1” if “OK” pressed
  • LotNumber
    • The Lot Number entered in the dialog
  • SerialNumber
    • The Serial Number entered in the dialog
  • QuantityUserUOM
    • The quantity entered in the dialog
  • QuantityLineUOM
    • The quantity entered in the dialog converted to the line UOM
  • TotalQuantityLineuOM
    • The quantity entered in the dialog (converted to the line UOM) plus the existing quantity to handle (as specified in the Configure Fields block)
  • UnitOfMeasure
    • The unit of measure chosen in the dialog
  • NumberOfLabels
    • The number of labels requested
  • ExpiryDate
    • The expiry date specified in the dialog

Enter Quantity Example

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

Application Designer:

Form Opens

Show Assign LP

The “Show Assign LP” block is a special purpose block to handle when a user scans/assigns a License Plate to a document.  This block will display a dialog indicating the current document requirements against the License Plate contents.

Show Assign LP

Block Configuration:

Option Description
Event ID The event to call to handle the actual assignment.
LP Number The License Plate number being assigned.

When executed users will see a dialog similar to this:

Android Emulator

Pressing “OK’ will trigger the event defined in the “Event ID” to be fired and the appropriate assignment actions to be taken.

Note: For more information on assigning License Plates please consult the Warehouse Insight user manual.

Show Assign LP Example

Provided below is an example of using the “Show Assign LP” block.

Application Designer:

License Plate Scanned

Show LP List

The “Show LP List” block is used to display a list of License Plates with some additional built in functionality for managing the License Plates.

Show LP List

Block Configuration:

Option Description
Show Assigned True if the listing should be filtered to only those assigned to the current document.
Show Available True if the listing should include License Plates that are not actively assigned to a document.
Allow Remove True if the dialog should provide an option for removing the selected License Plates assignment.
Allow New True if the dialog should provide an option for creating a new License Plate.
Note: The dialog uses event 95007 for fetching the list of License Plates.

When executed users will see a dialog similar to this:

Android Emulator

After execution the following variables will be set:

  • dialog_result
    • Will be “0” if “Cancel” pressed, “1” if “OK” pressed
  • action_result
    • The License Plate number selected

Show LP List Example

Provided below is an example of using the “Show LP List” block.  Only the Application Designer blocks are shown as it is sufficient to illustrate the inputs and outputs.

Application Designer:

Started License Plate

Show Picture

The “Show Picture’ block is used to display a dialog to the user with an image.  The Dialog will auto close after a specified period of time unless explicitly forced to stay open by the user.

Show Picture

Block Configuration:

Option Description
File Name Deprecated.  Do not use.
Image Blob The blob variable to load the image data from.
Display Time The number of seconds to remain open for before auto closing
Enabled True if the dialog should be shown, False if not.  Deprecated as recommended to put check prior to even executing the block.

When executed users will see a dialog similar to this:

Android Emulator
Note: If there is no image the dialog will not be displayed.

Show Picture Example

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

Application Designer:

Form Opens

Show Reservations

The “Show Reservations” block is used to prompt display the item tracking lines for a selected line.  The dialog allows adding, modifying and deleting tracking lines.  The block is tightly tied to Scan Behaviors as well as the menu standard action “Change Qty” and requires the Item Reservation events to be defined.  The quantity dialog displayed when required is the same as the “Enter Quantity” block and provides largely the same features and overrides.

Show Reservations

Block Configuration:

Option Description
Require LN True if the quantity dialog should show a field for the Lot Number.
False if the dialog should hide the Lot Number field (including the lot information button)
Require SN

True if the quantity dialog should show a field for the Serial Number.

False if the dialog should hide the Serial Number field (including the serial information button)

Auto Generate LN/SN True if the quantity dialog should generate a Lot or Serial number if one is not specified.
Label Default Qty. Enter an integer value greater than negative one to include a field on the quantity dialog to enter number of labels to print.  If left blank input field will be hidden.

When executed users will see a dialog similar to this:

Android Emulator

See the events “After Item Reservation is Added”, “After Item Reservation is Changed” and “After Item Reservation is Deleted” for expected outputs.

Show Reservation Example

Provided below is an example of using the “Show Reservations” block.  The example is based on a manual quantity change of a transfer shipment line.

Form Opens

Inspect Context

The “Inspect Context” block is used to display a list of all the current available variables and their values.  The variables are not limited to those that are specifically defined in the Application but include things like selected line data, barcode results and pda configuration.

The block is not intended for end user use but serves as a helpful block while designing applications.

Inspect Context

When executed users will see a dialog similar to this:

Android Emulator
Note: Pressing “Cancel” will abort any subsequent block execution.

Inspect Context Example

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

Application Designer:

Form Opens
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