6. Designer Action Blocks

Home/6. Designer Action Blocks

6. Designer Action Blocks

You are here:
Note: For earlier versions of Warehouse Insight, find the documentation 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 outline each available action and provide a brief example of how the action can be used.

Add Header Label

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

Add Header Label

Block Configuration:

Option Description
Label

The label to put beside the value (e.g., Document #).

You can leave the label blank with only text being displayed. The label is bolded if displayed.

Text The value to display (e.g., PO123456).
Note: This can be used in conjunction with PDA Columns showing header fields.

Add Header Label Example

The Application Designer example below uses Add Header Label:

Form Opens

Example Output:

Android Emulator

Close Form

Use Close Form to close the application.

Close Form
Note: This triggers When the Form Closes event.

Close Form Example

The Application Designer example below uses Close Form. This illustrates a common request to get some value from the user and the closes the screen. In a real application, you would call NAV to do something with that result prior to closing the screen.

Form Opens

Configure Fields

Configure Fields 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 allows Enter Quantity dialog to understand Scan Behavior option of Default to Line Quantity. Without this block, the application does not know which column to reference.

An error is thrown on the handhelds if this block has been forgotten and is required. Fields names must match those being returned by NAV.

Configure Fields

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 line’s bin code.
Shelf Field The field that indicates the line’s shelf number.
Item No. Field The field that indicates the line’s item number.
Variant Field The field that indicates the line’s variant code.
Lot No. Field The field that indicates the line’s lot number.
Serial No. Field The field that indicates the line’s serial number.
Unit of Measure Field The field that indicates the line’s unit of measure.
Expiry Date Field The field that indicates the line’s expiry day.
Note: Not all fields are required for all instances/applications.

Configure Fields Example

The Application Designer example below uses Configure Fields. The example users the PDA columns returned from the Sales Order (event 70000). Shelf, Lot, Serial, and Expiry fields are not required as they are not available on the sales line.

Form Opens

Create Log Entry

Use Create Log Entry to insert log statements. The log entries can later be viewed from the main landing page Show Log menu action. Log entries are created if the log level is equal or higher to the level specified in the configuration.

Display Mode

Block Configuration:

Option Description
Log Level

The log level to create the entry for.

  • Trace
  • Debug
  • Info
  • Warn
  • Error
  • Fatal
Log Context

Indicates if the context is logged as well. Entries are in the form of key/value pairs.

  • None (no context entries are made)
  • Fields (the current columns/fields are included)
  • All (all context entries are included: fields, configuration, custom variables, etc.)
Message The log entry message to create.

Create Log Entry Example

The Application Designer example below uses Create Log Entry:

Form Opens

Display Mode

Use Display Mode to control whether a data grid view (all lines) displays to the user or if the records display one at a time in a card panel. If this block is not encountered when data is being loaded, then the application defaults 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 Find Matching Line (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

The Application Designer example below uses Display Mode:

Form Opens

Find First Line With

Find First Line With 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) is 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 are set:

  • Found: Will be True if the record was found; False if not found.

Find First Line With Example

The Application Designer example below uses Find First Line With:

Form Opens

Find a Matching Line

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

Find a Matching Line

After execution, the following variables are set:

  • Found: 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

The Application Designer example below uses Find a Matching Line:

Scanned Item

Get GEO Location

Use Get GEO Location to retrieve information about the device’s physical location.

Find a Matching Line

Block Configuration:

Option Description
Use Last Known True if the location is based off the device’s last cached location. It may be faster to use the cache instance than forcing the device to re-query for the current location but may be less accurate.
Accuracy

The accuracy to fetch the location to.

  • Default
  • Best (0-100 meters)
  • High (0-100 meters)
  • Medium (100-500 meters)
  • Low (500 meters)
  • Lowest (500 meters)
Timeout (seconds) The time to wait for a query to return. Default 30 seconds.

After execution, the following variables are set:

  • geo_latitude: The latitude.
  • geo_longitude: The longitude.
  • geo_altitude: The altitude in meters. May not be available on all devices.
  • geo_accuracy: The accuracy that was used for the locations.
  • geo_mockprovider: True if a mock provider was used to get the location.
Note: You are prompted to allow the application to access the devices location when run for the first time.

Get GEO Location Example

The Application Designer example below uses Get GEO Location:

Scanned Item

Output:

Scanned Item

Open Web

Use Open Web 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).

Open Web Example

The Application Designer example below uses Open Web:

Form Opens

Run Event

Use Run Event to send data to NAV when you do not expect a dataset in response. Any errors or message returned from NAV is displayed. If an error is thrown, no further processing occurs.

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

The Application Designer example below uses Run Event:

Form Opens

NAV Code:

Code

Example Output:

Android Emulator

Run Event Set Table Field Value

Run Event Set Table Field Value can be used to update a table field without the need to write custom code:

Run Event Set Table Field Value

Block Configuration:

Option Column 2
Table Number The ID of the table being modified.
Field Name The name of the field being modified.
Filter Fields

A comma-separated list of fields that is used to filter the table.

The Filter Fields must be defined as variables prior to block execution and the filter values set accordingly.

Run Event Set Table Field Value Example

The Application Designer example below uses Run Event Set Table Field Value:

Form Opens

This example illustrates updating the Warehouse Receipt Line (ID: 7317) Qty. to Receive with a value of 5. The table filters are set for: No.: RE000051 and Line No.: 10000.

Run Event Set Value

Use Run Event Set Value 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

The Application Designer example below uses Run Event Set Value:

Form Opens

NAV Code:

Form Opens

Example Output:

Android Emulator

Scan Barcode

Use Scan Barcode to simulate a barcode scan. The scan is 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

The Application Designer example below uses Scan Barcode:

Form Opens

Run Intent

Use Run Intent 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 Intent Example

The Application Designer example below uses Run Intent:

Form Opens

Set Status Bar

Use Set Status Bar to populate a message in the bottom status bar of the application. The status bar text persists until overwritten with another message or cleared.

Set Status Bar

Block Configuration:

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

Set Status Bar Example

The Application Designer example below uses Set Status Bar:

Form Opens

Set Title

Use Set Title to set the title of the Application. If this block is not present, the title is the NAV-defined Application code.

Set Title

Block Configuration:

Option Description
Expression The title to set for the page.

Set Title Example

The Application Designer example below uses Set Title:

Form Opens

Show Remaining

Show Remaining 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 Configure Fields requires to be set.

Show Remaining

Block Configuration:

Option Description
Mode

Selecting Quantities displays a sum of the remaining quantity to handle from all lines. The label shown is Open Qty: xxx.

Selecting Lines displays a count of all the lines that having remaining quantity to handle. The label shown is Open Lines: xxx.

When executed, users see a label like this:

Android Emulator

Show Remaining Example

The Application Designer example below uses Show Remaining:

Form Opens

Show Search Control

Use Search Control to display a search/filter option at the top of the application page. This is used for lookup type list pages.

Show Search Control

When the search control loses focus, When Loading Document Data event fires, and a context variable called filter is added containing the current search text.

When executed, users see a something like this:

Android Emulator

Show Search Control Example

The Application Designer example below uses Show Search Control.

Form Opens

Start an Application

Use Start an Application 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

The Application Designer example below uses Start an Application. The example displays a list of items and waits for the user to scan an Item barcode. ITEM_DETAILS application is not illustrated here but takes the scanned barcode data and populates the results accordingly.

Form Opens

Start Event

Use Start Event to execute a Custom Event defined in the application. Execution of the current sequence resumes once the custom event has completed.

Start Event

Block Configuration:

Option Description
Event Name The custom event to execute.

Start Event Example

The Application Designer example below uses Start Event:

Form Opens

Start License Plate

Start License Plate triggers the Start License Plating action. Internally, this toggles any menus that have LP Create standard action to say Stop License Plating. The application event When a License Plate is Started is raised and can be processed further.

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

The Application Designer example below uses Start License Plate. This example responds to a License Plate scan and if there are no lines on the License Plate (blank), treats it as if they were starting it (packing/loading).

Form Opens

Stop License Plate

Stop License Plate triggers the Stop License Plating action. Internally, this toggles any menus that have LP Create standard action to say Start License Plating. The application event When a License Plate is Stopped is raised and can be processed further.

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

The Application Designer example below uses Stop License Plate. This example responds to a license plate scan, and if there is an active License Plate, triggers the Stop License Plate event, which asks to print out a label.

Form Opens

Timer

Timer is used to execute an event after a specified period.

Stop License Plate

Block Configuration:

Option Description
Event Name The name of the custom event to call when the timer triggers.
Interval (seconds)

The number of seconds to wait before calling the event. Default 30 seconds.

Run When Hidden True if the event should fire even if the page is currently not visible (e.g., if there is a quantity dialog on top). If false and the timer triggers while the page is hidden, the timer resets and fires again at the next interval.
Note: The timer must be created again on each execution if you want it to fire again.

Timer Example

The Application Designer example below uses Timer:

Stop License Plate

Update Data

Update Data is used to retrieve header/line document data from NAV. If there is a grid/panel present on the page, it causes 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 causes the entire grid/panel dataset to be cleared and repopulated. Use this option if first loading or the result being returned is the full data. Dataset must include the header data as well if applicable.

Selecting Update Existing causes the lines returned in the line dataset to be Updated. This uses Configure Fields Line No. configuration to determine line matches. If the line cannot be found, it is inserted/created.

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

Update Data Example

The Application Designer example below uses  Update Data to retrieve item (header) and bin content (line) information:

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