6. Designer Action Blocks

Home/6. Designer Action Blocks

6. Designer Action Blocks

You are here:

The designer actions generally do not show input/dialog controls to the user but are instead intended to facilitate the process logic between elements.  Such things like:

  • Initializing the application
  • Sending/Getting Data From NAV
  • Triggering internal processes

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

Add Header Label

Use the “Add Header Label” block to add instructions to the top of the application.

Add Header Label

Block Configuration:

Option Description
Label

The label to put beside the value.  Example “Document #:

The label can be left blank in which case only the text will be displayed.  The label will be bolded if displayed.

Text The value to display.  Example “PO123456”
Note: This can be used in conjunction with PDA Columns showing “header” fields.

Add Header Label Example

Provided below is an example of using the “Add Header Label” block.

Application Designer:

Form Opens

Example Output:

Android Emulator

Close Form

Use the “Close Form” block to close the application.

Close Form
Note: This will also trigger the “When the Form Closes” event.

Close Form Example

Provided below is an example of using the “Close Form” block.  This illustrates a common request to get some value from the user and the closes the screen.  In a real application you would likely call NAV to do something with that result prior to closing the screen.

Application Designer:

Form Opens

Configure Fields

The “Configure Fields” block is used to initialize the application when working with document line data.  This block maps up the columns being returned by NAV to the internal workings of the application and other assumed behaviors.  Primary interactions are with “Scan Behaviors” and “Find Line Templates”.

For example this will allow the “Enter Quantity” dialog to understand the “Scan Behavior” option of ‘Default to Line Quantity”.  Without this block the application does not instinctively know what column to reference.

Configure Fields

An error will be thrown on the handhelds if this block has been forgotten and is required.

Fields names must match those being returned by NAV.

Block Configuration:

Option Description
Quantity to Handle Field The field that the user would be updating quantity on
Already Handled Field The field that indicates any posted quantities
Total Quantity Field The field that indicates the original starting quantity
Line No. Field The unique identifier for the line (primary key)
Bin Code Field The field that indicates the lines bin code
Shelf Field The field that indicates the lines shelf number
Item No. Field The field that indicates the lines item number
Variant Field The field that indicates the lines variant code
Lot No. Field The field that indicates the lines lot number
Serial No. Field The field that indicates the lines serial number
Unit of Measure Field The field that indicates the lines unit of measure
Expiry Date Field The field that indicates the lines expiry day
Note: Not all fields will be required for all instances/applications.

Configure Fields Example

Provided below is an example of using the “Configure Fields” block. The example provided is using the PDA columns returned from the Sales Order (event 70000). Shelf/Lot/Serial/Expiry fields are not required as they are not available on the sales line.

Application Designer:

Form Opens

Display Mode

Use the “Display Mode” block to control whether a data grid view (all lines) is displayed to the user or if the records are displayed one record at a time in a card panel.  If this block is not encountered when data is being loaded then the application will default to displaying in grid view mode.

Display Mode

Block Configuration:

Option Description
Mode

Select Grid View to view data in grid view.

Select Card View to display lines one record at a time in a panel.

Auto Advance Applicable only to “Card View”.  Specify True if you want the panel to advance to the next record if the current line quantity is finished being handled.  Specify False if users must manually use the next button to advance.
Find Line Applicable only to “Card View”.  Specify True if panels can be found using the “Find Matching Line” block (e.g. scan an item and have it find an appropriate panel).  Specify False if the user must manually navigate to the records required.

Example of “Grid View”:

Android Emulator

Example of “Card View”:

Android Emulator

Display Mode Example

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

Application Designer:

Form Opens

Find First Line With

The “Find First Line With” block can be used when you are display a data grid (or card panel) to find the first line that has a specific value in the specified column.  If a match is found the line (or panel) will be selected.

Find First Line With

Block Configuration:

Option Description
Column Name The name of the column to find the value in.
Value to Look For The value to try and find

After execution the following variables will be set:

  • Found
    • Will be “True” if the record was found, “False” if not found.

Find First Line With Example

Provided below is an example of using the “Find First Line With” block.

Application Designer:

Form Opens

Find a Matching Line

Use the “Find a Matching Line” block to find/select a line based on the barcodes scanned.  This block requires a “Configure Fields” block to be defined and utilizes the “Find Line Templates” defined in NAV.

Find a Matching Line

After execution the following variables will be set:

  • Found
    • Will be “True” if a matching line found, “False” if no matching line found
Note: For more information on the matching logic reference the Find Line Templates in the Warehouse Insight documentation.

Find a Matching Line Example

Provided below is an example of using the “Find a Matching Line” block.

Application Designer:

Scanned Item

Open Web

Use the “Open Web” block to open a specified web page.

Open Web

Block Configuration:

Option Description
URL The URL to open.  Must be fully specified (e.g. include the ‘http’).

Run Event Example

Provided below is an example using the “Open Web” block.

Application Designer:

Form Opens

Run Event

Use the “Run Event” block to send data to NAV when you don’t expect a dataset in response.  Any errors or message returned from NAV will be displayed.  If an error is thrown no further processing will occur.

Run Event

Block Configuration:

Option Description
Event ID The NAV event to call.  All context params are sent to NAV as part of the request.

Run Event Example

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

Application Designer:

Form Opens

NAV Code:

Code

Example Output:

Android Emulator

Run Event Set Table Field Value

Run Event Set Table Field Value

Run Event Set Value

Use the “Run Event Set Value” block to call NAV and populate the application variable with the response.

Run Event Set Value

Block Configuration:

Option Column 2
Event ID The NAV event to call.  All context params are sent to NAV as part of the request.
Variable The variable to populate with the result

Run Event Set Value Example

Provided below is an example of using the “Run Event Set Value” block.

Application Designer:

Form Opens

NAV Code:

Form Opens

Example Output:

Android Emulator

Scan Barcode

Use the “Scan Barcode” block to simulate a barcode scan.  The scan will be processed exactly as if it had been scanned on the device by the user, including firing events back into your application.

Scan Barcode

Block Configuration:

Option Description
Barcode The barcode to scan.  This needs to include any prefix information as well.  E.g. %LP%LP123456.

Scan Barcode Example

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

Application Designer:

Form Opens

Run Intent

Use the “Run Intent” block to execute an Android Intent.  This block is only usable by Android devices currently.Use the “Run Intent” block to execute an Android Intent.  This block is only usable by Android devices currently.

Run Intent

Block Configuration:

Option Description
Intent

The Intent URI string to execute

Examples:

  • tel:18664407543
  • geo:16.053200,108.20284?q=16.053200.108.20284
  • content://contacts/people/1
  • content://contacts/people

http://www.google.com

Run Event Set Value Example

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

Application Designer:

Form Opens

Set Status Bar

Use the “Set Status Bar” block to populate a message in the bottom status bar of the application.  The status bar text will persist until over written with another message or cleared.

Set Status Bar

Block Configuration:

Option Description
Expression The message to display.
Note: The status bar will not be visible until a “Set Status Bar” block is executed for the first time.

Set Status Bar Example

Provided below is an example of using the “Set Status Bar” block.

Application Designer:

Form Opens

Set Title

Use the “Set Title” block to set the title of the Application.  If this block is not present then the title will be the Application code as defined in NAV.

Set Title

Block Configuration:

Option Description
Expression The title to set for the page

Set Title Example

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

Application Designer:

Form Opens

Show Remaining

The “Show Remaining” block controls whether the top right corner of page shows how many lines or how much quantity is remaining to be handled.  This control is designed to be used when displaying document type data (grid or panel) as requires the “Configure Fields” to be set.

Show Remaining

Block Configuration:

Option Description
Mode

Selecting “Quantities” will display a sum of the remaining quantity to handle from all lines.  The label shown will be “Open Qty: xxx”

Selecting “Lines” will display a count of all the lines that having remaining quantity to handle.  The label shown will be “Open Lines: xxx”

When executed users will see a label similar to this:

Android Emulator

Show Remaining Example

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

Application Designer:

Form Opens

Show Search Control

Use the “Search Control” block if you wish to display a ‘search/filter’ option at the top of the application page.  This would typically be used for lookup type list pages.

Show Search Control

When the search control loses focus the “When Loading Document Data” event will be fired and a context variable called “filter” will be added that contains the current search text.

When executed users will see a something similar to this:

Android Emulator

Show Search Control Example

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

Form Opens

Start an Application

Use the “Start an Application” block to launch another custom Application.  When the new application is launched the current context is passed to the new application.

Start An Application

Block Configuration:

Option Description
Application Name The application name to launch

Start an Application Example

Provided below is an example of using the “Start an Application” block.  The example displays a list of items and waits for the user to scan an Item barcode.  The “ITEM_DETAILS” application is not illustrated here but would likely take the scanned barcode data and populate the results accordingly.

Application Designer:

Form Opens

Start Event

Use the “Start Event” block to execute a “Custom Event” block defined in the application.  Execution of the current sequence will be resumed once the custom event has completed.

Start Event

Block Configuration:

Option Description
Event Name The custom event to execute

Start Event Example

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

Application Designer:

Form Opens

Start License Plate

The “Start License Plate” block is used to trigger the Start License Plating action.  Internally this will toggle any menus that have the “LP Create” standard action to say “Stop License Plating”.  The application event “When a License Plate is Started” will then be raised and any additional processing can be taken at that point.

Start License Plate
Note: This block functions the same as pressing a menu with the standard action of “LP Create” where the current state is not license plating.

Start License Plate Example

Provided below is an example of using the “Start License Plate” block.  This example responds to a License Plate scan and if there are no lines on the License Plate (blank) then treats it as if they were starting it (packing/loading).

Application Designer:

Form Opens

Stop License Plate

The “Stop License Plate” block is used to trigger the Stop License Plating action.  Internally this will toggle any menus that have the “LP Create” standard action to say “Start License Plating”.  The application event “When a License Plate is Stopped” will then be raised and any additional processing can be taken at that point.

Stop License Plate
Note: This block functions the same as pressing a menu with the standard action of “LP Create” where the current state is license plating.

Stop License Plate Example

Provided below is an example of using the “Stop License Plate” block.  This example responds to a License Plate scan and if there is an active License Plate triggers the Stop License Plate event which will ask to print out a label.

Application Designer:

Form Opens

Update Data

The “Update Data” block is used to retrieve header/line document data from NAV.  If there is a grid/panel present on the page it will cause the grid/panel to be populated/updated.

Update Data

Block Configuration:

Option Description
Event ID The NAV event to call to get the data from.  All context params are sent to NAV as part of the request.
Mode _ Data

Selecting “Replace Entire” will cause the entire grid/panel dataset to be cleared and repopulated.  Use this option if first loading or are sure the result being returned is the full data.  Dataset must include the header data as well if applicable.

Selecting “Update Existing” will cause just the lines returned in the line dataset to be updated.  This will use the “Configure Fields” “Line No.” configuration to determine line matches.  If the line cannot be found it will be inserted/created.

Note: For a list of Warehouse Insight events you can reference the “Events” page in NAV.

Update Data Example

Provided below is an example of using the “Update Data” block to retrieve item (header) and bin content (line) information.

Application Designer:

Form Opens

NAV Code:

Code

PDA Columns:

PDA Columns

Example Output:

Android Emulator
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