Application Help for SAP Extended Warehouse Management Add ...
Warehouse Insight Application Development · 2020. 7. 30. · 12. Open the “PDA Menus” in NAV...
Transcript of Warehouse Insight Application Development · 2020. 7. 30. · 12. Open the “PDA Menus” in NAV...
© Copyright 2016, Insight Works
Warehouse Insight Application Development
2.0
© Copyright 2016, Insight Works Page i
Table of Contents
1 Prerequisites ........................................................................................... 1
2 Introduction ............................................................................................ 2
3 Getting Started ....................................................................................... 3
3.1 Configuring NAV ..................................................................................................................... 3
3.2 Hello World ............................................................................................................................... 3
4 Designer Interface .................................................................................. 7
4.1 Block Quick Reference .......................................................................................................... 7
5 Designer Event Blocks ......................................................................... 16
5.1 After a Row is Selected ....................................................................................................... 16
5.2 After Item Reservation is Added ..................................................................................... 16
5.2.1 After Item Reservation is Added Example ..............................................................................16
5.3 After Item Reservation is Changed ................................................................................ 17
5.3.1 After Item Reservation is Changed Example .........................................................................18
5.4 After Item Reservation is Deleted ................................................................................... 18
5.4.1 After Item Reservation is Deleted Example ............................................................................19
5.5 Custom Event ......................................................................................................................... 19
5.5.1 Custom Event Example ...................................................................................................................19
5.6 When a Bin is Scanned ....................................................................................................... 20
5.6.1 When a Bin is Scanned Example .................................................................................................20
5.7 When a Document is Scanned ........................................................................................ 21
5.7.1 When a Document is Scanned Example ..................................................................................21
5.8 When a License Plate is Scanned .................................................................................... 21
5.8.1 When a License Plate is Scanned Example .............................................................................22
5.9 When a License Plate is Started ...................................................................................... 22
5.9.1 When a License Plate is Started Example ...............................................................................22
5.10 When a License Plate is Stopped .................................................................................... 23
5.10.1 When a License Plate is Stopped Example .............................................................................24
5.11 When a License Plate Template is Scanned ................................................................ 24
5.11.1 When a License Plate Template is Scanned Example.........................................................24
5.12 When a Location is Scanned ............................................................................................ 25
5.12.1 When a Location is Scanned Example ......................................................................................25
© Copyright 2016, Insight Works Page ii
5.13 When a Tag is Scanned ...................................................................................................... 25
5.13.1 When a Tag is Scanned Example ...............................................................................................25
5.14 When an Item is Scanned .................................................................................................. 26
5.14.1 When an Item is Scanned Example ...........................................................................................26
5.15 When Loading Document Data ....................................................................................... 27
5.15.1 When Loading Document Data Example ................................................................................27
5.16 When Quantity Should Change on a Row .................................................................. 27
5.16.1 When Quantity Should Change on a Row Example ...........................................................27
5.17 When Text is Scanned ......................................................................................................... 28
5.17.1 When Text is Scanned Example ..................................................................................................28
5.18 When the Form Closes ....................................................................................................... 29
5.18.1 When the Form Closes Example .................................................................................................29
5.19 When the Form Opens ....................................................................................................... 29
5.19.1 When the Form Opens Example .................................................................................................29
6 Designer Interaction Blocks ................................................................ 31
6.1 Ask for a Date......................................................................................................................... 31
6.1.1 Ask for a Date Example ..................................................................................................................34
6.2 Ask for a Number ................................................................................................................. 34
6.2.1 Ask for a Number Example ...........................................................................................................36
6.3 Ask for Confirmation ........................................................................................................... 36
6.3.1 Ask for Confirmation Example.....................................................................................................38
6.4 Ask for Text ............................................................................................................................. 38
6.4.1 Ask for Text Example .......................................................................................................................40
6.5 Capture Signature ................................................................................................................ 40
6.5.1 Capture Signature Example ..........................................................................................................42
6.6 Choose From List .................................................................................................................. 42
6.6.1 Choose From List Example ............................................................................................................44
6.7 Choose From Table .............................................................................................................. 45
6.7.1 Choose From Table Example – Table Filters ..........................................................................46
6.7.2 Choose From Table Example – Event ID ..................................................................................47
6.8 Choose With Buttons .......................................................................................................... 49
6.8.1 Choose With Buttons Example ....................................................................................................50
6.9 Display a Message ................................................................................................................ 51
© Copyright 2016, Insight Works Page iii
6.9.1 Display a Message Example .........................................................................................................52
6.10 Display an Error ..................................................................................................................... 53
6.10.1 Display an Error Example ...............................................................................................................54
6.11 Editable Panel ......................................................................................................................... 55
6.11.1 Editable Panel Example 1 ..............................................................................................................57
6.11.2 Editable Panel Example 2 ..............................................................................................................58
6.12 Enter Quantity ........................................................................................................................ 60
6.12.1 Enter Quantity Example .................................................................................................................63
6.13 Show Assign LP...................................................................................................................... 63
6.13.1 Show Assign LP Example ...............................................................................................................65
6.14 Show LP List ............................................................................................................................ 65
6.14.1 Show LP List Example ......................................................................................................................66
6.15 Show Picture ........................................................................................................................... 67
6.15.1 Show Picture Example ....................................................................................................................68
6.16 Show Reservations ............................................................................................................... 69
6.16.1 Show Reservations Example .........................................................................................................70
6.17 Inspect Context...................................................................................................................... 71
6.17.1 Inspect Context Example ...............................................................................................................72
7 Designer Action Blocks ....................................................................... 74
7.1 Add Header Label ................................................................................................................. 74
7.1.1 Add Header Label Example ..........................................................................................................74
7.2 Close Form .............................................................................................................................. 76
7.2.1 Close Form Example ........................................................................................................................76
7.3 Configure Fields .................................................................................................................... 76
7.3.1 Configure Fields Example ..............................................................................................................78
7.4 Display Mode ......................................................................................................................... 78
7.4.1 Display Mode Example ...................................................................................................................80
7.5 Find First Line With .............................................................................................................. 81
7.5.1 Find First Line With Example ........................................................................................................82
7.6 Find a Matching Line ........................................................................................................... 82
7.6.1 Find a Matching Line Example ....................................................................................................82
7.7 Open Web ............................................................................................................................... 83
7.7.1 Run Event Example ..........................................................................................................................83
© Copyright 2016, Insight Works Page iv
7.8 Run Event ................................................................................................................................. 83
7.8.1 Run Event Example ..........................................................................................................................84
7.9 Run Event Set Table Field Value ...................................................................................... 85
7.9.1 Run Event Set Table Field Value Example ...............................................................................86
7.10 Run Event Set Value ............................................................................................................. 86
7.10.1 Run Event Set Value Example ......................................................................................................87
7.11 Scan Barcode .......................................................................................................................... 88
7.11.1 Scan Barcode Example ...................................................................................................................89
7.12 Run Intent ................................................................................................................................ 89
7.12.1 Run Event Set Value Example ......................................................................................................90
7.13 Set Status Bar ......................................................................................................................... 90
7.13.1 Set Status Bar Example ...................................................................................................................90
7.14 Set Title ..................................................................................................................................... 91
7.14.1 Set Title Example ..............................................................................................................................91
7.15 Show Remaining ................................................................................................................... 91
7.15.1 Show Remaining Example .............................................................................................................92
7.16 Show Search Control ........................................................................................................... 93
7.16.1 Show Search Control Example ....................................................................................................94
7.17 Start an Application ............................................................................................................. 95
7.17.1 Start an Application Example .......................................................................................................95
7.18 Start Event ............................................................................................................................... 95
7.18.1 Start Event Example .........................................................................................................................96
7.19 Start License Plate ................................................................................................................ 96
7.19.1 Start License Plate Example ..........................................................................................................96
7.20 Stop License Plate ................................................................................................................ 97
7.20.1 Stop License Plate Example ..........................................................................................................97
7.21 Update Data............................................................................................................................ 97
7.21.1 Update Data Example .....................................................................................................................98
8 Designer Context Blocks ................................................................... 101
8.1 Using the Selected Line ................................................................................................... 101
8.1.1 Using the Selected Line Example ............................................................................................ 101
8.2 Using the Document Header ........................................................................................ 102
8.2.1 Using the Document Header Example .................................................................................. 102
© Copyright 2016, Insight Works Page v
8.3 Using the PDA Configuration ........................................................................................ 102
8.3.1 Using the PDA Configuration Example ................................................................................. 103
8.4 Using the Last Scanned Barcode ................................................................................. 103
8.4.1 Using the Last Barcode Scanned Example........................................................................... 106
9 Designer Variable Blocks................................................................... 108
9.1 Variable .................................................................................................................................. 108
9.1.1 Variable Example ........................................................................................................................... 108
9.2 Set Variable .......................................................................................................................... 109
9.2.1 Set Variable Example.................................................................................................................... 109
9.3 Integer Variable .................................................................................................................. 110
9.3.1 Integer Variable Example ........................................................................................................... 110
9.4 Text Variable ........................................................................................................................ 110
9.4.1 Text Variable Example ................................................................................................................. 110
9.5 Boolean Variable ................................................................................................................ 111
9.5.1 Boolean Example ........................................................................................................................... 111
9.6 Known Event Variable ...................................................................................................... 111
9.6.1 Known Event Example ................................................................................................................. 111
9.7 Dialog Result Variable ...................................................................................................... 111
9.7.1 Dialog Result Example ................................................................................................................. 112
9.8 Evaluate Number ............................................................................................................... 112
9.8.1 Evaluate Number Example ......................................................................................................... 113
9.9 Evaluate Text ....................................................................................................................... 113
9.9.1 Evaluate Text Example ................................................................................................................. 114
9.10 Is any lot tracked ................................................................................................................ 114
9.10.1 Is any lot tracked Example ......................................................................................................... 114
9.11 Is any serial tracked .......................................................................................................... 115
9.11.1 Is any serial tracked Example .................................................................................................... 115
10 Designer Logic Blocks ........................................................................ 116
10.1 IF Block .................................................................................................................................. 116
10.1.1 IF Block Example ............................................................................................................................ 116
10.2 IF – ELSE Block .................................................................................................................... 117
10.2.1 IF-ELSE Block Example ................................................................................................................. 117
10.3 IF – ELSE IF – ELSE .............................................................................................................. 117
© Copyright 2016, Insight Works Page vi
10.3.1 IF - ELSE IF – ELSE Block Example ........................................................................................... 118
10.4 Comparison Block.............................................................................................................. 119
10.4.1 Comparison Block Example ....................................................................................................... 120
10.5 Logical Comparison Block .............................................................................................. 120
10.5.1 Logical Comparison Block Example ....................................................................................... 120
10.6 Not Block .............................................................................................................................. 121
10.6.1 Not Block Example ........................................................................................................................ 121
A PDA Menus ......................................................................................... 122
B Extension Codeunits .......................................................................... 123
© Copyright 2016, Insight Works Page vii
Version
Date Author Version Change
August 25, 2018 R. Trudeau 1.9.0 Initial version
© Copyright 2016, Insight Works
CONFIDENTIAL
The information contained herein is confidential and proprietary to Insight Works. It may
not be disclosed or transferred, directly or indirectly, to any third party without the
explicit written permission of Insight Works.
All rights reserved. No part of this document may be reproduced, stored in a retrieval
system, translated, or transmitted in any form or by any means, electronic, mechanical,
photocopying, recording, or otherwise, without prior written permission of Insight
Works.
© Copyright 2016, Insight Works Page 1
1 Prerequisites
© Copyright 2016, Insight Works Page 2
2 Introduction At a high level Warehouse Insight Applications allow users to create customized screens
and processes within the handheld application without the need to modify the
underlying source code or deploy additional files to the handhelds. Applications consist
of two parts:
1. Design/control blocks indicating the application process flow and user
interactions
2. NAV code to handle any data requests
Applications can be complete, complex fully standalone modules (e.g. existing modules
like shipping/receiving) or as simple one dialog processes (e.g. asking for a line
comment). When designing an application it is important to remember that the
controls/UI elements available are pre-determined and cannot usually be changed. For
instance – asking a user for a comment you could have the application display an input
box (title, prompt and edit box) but it would not be possible to bold the caption or
prevent certain values from being entered (though you could check after the dialog
closes).
This document will attempt to describe all the available controls, options and
interactions while providing concrete examples to assist in your own development. In
addition to this document users are encouraged to reference the existing applications as
needed for further ideas and usage scenarios.
Note: For additional documentation or assistance contact support or reference the
customer portal.
© Copyright 2016, Insight Works Page 3
3 Getting Started To get started creating Applications you should already have the prerequisite
components in place and access to a test device. This section will describe the
configuration and walk through creating a very simple “Hello World” application.
3.1 Configuring NAV
In order to work with applications you must specify the path to the designer in the
Warehouse Insight Setup.
• Open the Warehouse Insight Setup card
o Departments -> Warehouse Insight -> Administration -> Warehouse Insight
Setup
• Enter the URL to your Warehouse Insight Web Service
o General -> Environment -> Warehouse Insight Web Service
Note: For assistance in determining the correct value consult the Warehouse
Installation manual or contact support.
3.2 Hello World
This section will provide a very quick tutorial into making your first Application.
Follow the steps below to create a simple link on the main page of the handheld that will
display a message to the user.
© Copyright 2016, Insight Works Page 4
1. Open the Application page.
a. Departments -> Warehouse Insight -> Setup -> Applications
2. Select ‘New’ to create a new Application
3. Enter “HELLO WORLD” for the “Code”
4. Click “Design”
a. Actions -> Design
b. You should see a screen similar to the following. If not, ensure the
Warehouse Insight Setup web service has been correctly entered.
5. Select the “When the form starts” control and drag it onto the design area.
a. “Events” -> “When the Form Opens”
6. Select the “Display a Message” control and drag it under the previous control so
that they connect.
© Copyright 2016, Insight Works Page 5
a. “Interactions” -> “Display a Message”
7. Select the green “String Variable” and drag it onto the “Title” connector of the
message control.
a. “Variables” -> “ “
b. Type in “Message” for the value.
8. Select another green “String Variable” and drag in onto the “Message” property
connector of the message control.
a. “Variables” -> “ “
b. Type in “Hello World!” for the value.
9. Select the “Close Screen” control and drag it under the “Display a Message”
control so that they connect.
a. “Actions” ->”Close Screen”
10. You should now have a screen similar to the following:
11. Click the “Save” button.
a. This will save your changes to NAV.
12. Open the “PDA Menus” in NAV to associate the new application to a PDA option.
a. “Departments” -> “Warehouse Insight” -> “Setup” -> “PDA Menus”
b. Choose “Main” from the “Form” drop down options
13. Insert a new record and enter the following values:
a. “Caption”: “Test Application”
b. “Standard Action”: “Start Module”
c. “Custom 1”: “HELLO WORLD”
i. Can also be set in the “Module To Start” at the bottom of the page
d. “Custom 2”: “24”
i. Can also be set in the “(Advanced) Application Reference” at the bottom
of the page
© Copyright 2016, Insight Works Page 6
14. Click “OK” to finish modifying the menu options.
15. Launch Warehouse Insight on the handheld
a. You should have an icon that looks similar to this:
16. Click the “Test Application” link
a. Your application message should appear
This concludes the brief introduction into making your first basic application. More
detailed descriptions, interactions and usage scenarios are provided in the following
sections.
© Copyright 2016, Insight Works Page 7
4 Designer Interface The interface for designing applications consists of a pre-set number of blocks. Each
control/block performs a specific task or encompasses a pre-defined event in the system.
Some blocks will be used to respond to actions taken by users (e.g. when a barcode is
scanned) on the handheld while others will be used to initiate actions for the user to
respond to (e.g. asking for quantity) while other blocks are there merely to facilitate the
application flow (e.g. sending/getting data from NAV).
The designer has no pre-determined width or height and as such can be scrolled
indefinitely. However, a good practice to follow when making large applications is to put
each starting event in a single row so that to find a specific event you need only scroll
horizontally to find rather than scrolling vertically as well. For simpler applications laying
out such that it fits on a single screen is usually best.
4.1 Block Quick Reference
The following table can be used as a quick reference of the different blocks. Additional
details on usage will be provided in subsequent sections.
Control Category Description
After a Row is Selected
Events
After Item Reservation is Added
Events This event is triggered when a reservation
is added via the reservation dialog.
After Item Reservation is Changed
Events This event is triggered when a reservation
is modified via the reservation dialog.
After Item Reservation is Deleted
Events This event is triggered when a reservation
is deleted via the reservation dialog.
Custom Event
Events This block is used to break out functions
into more manageable pieces. It can be
called from within the application via the
“Start Event” block or from a PDA Menu
with a standard action of “Application
Event”.
When a Bin is Scanned
Events This event is triggered when a Bin barcode
is scanned.
When a Document is Scanned Events This event is triggered when Document
barcode is scanned. The types of
© Copyright 2016, Insight Works Page 8
Document barcodes are predefined (Sales
Order, Transfer Order, Production Order,
Warehouse. Shipment, etc.).
When a License Plate is Scanned
Events This event is triggered when a License
Plate barcode is scanned.
When a License Plate is Started
Events This event is triggered when a PDA Menu
with a standard action of “LP Create” is
clicked and there is not an active License
Plate.
When a License Plate is Stopped
Events This event is triggered when a PDA Menu
with a standard action of “LP Create” is
clicked and there is an active License
Plate.
When a License Plate Template is
Scanned
Events This event is triggered when a License
Plate Template barcode is scanned.
When a Location is Scanned
Events This event is triggered when a Location
barcode is scanned.
When a Tag is Scanned
Events This event is triggered when a Tag
barcode is scanned.
When an Item is Scanned
Events This event is triggered when an Item
barcode is scanned.
When Loading Document Data
Events This event is used to signify that a data
grid/panel is required on the application
page and then will be called when time to
populate/update the grid data.
When Quantity Should Change on a
Row
Events This event is triggered when a PDA Menu
with a standard action of “Change Qty” is
clicked.
When Text is Scanned
Events This event is triggered when a Text
barcode is scanned.
First pass is to attempt to decode the Text
barcode as an item. If that fails and this
block is not present an error will be
thrown. If this block is present then it will
be called.
© Copyright 2016, Insight Works Page 9
When the Form Closes
Events This event is triggered just before the
application closes.
When the Form Opens
Events This event is triggered when the
application first loads.
Ask for a Date
Interactions This block can be used to prompt the user
to select a date.
Ask for a Number
Interactions This block can be used to request a
decimal number from the user and should
be used when you don’t require lot/serial
or UOM information.
Ask for Confirmation
Interactions Use this block to display a confirmation
dialog to the user.
Ask for Text
Interactions Use this block to ask the user for some
input text.
Capture Signature Interactions Use this block to prompt the user for a
signature.
© Copyright 2016, Insight Works Page 10
Choose From List
Interactions This block will prompt the user to select a
choice/option from a drop down list.
Choose From Table
Interactions Use this block to display a grid listing of
options/rows that the user can select
from.
Choose With Buttons
Interactions This block will prompt the user to select a
choice/option where each choice is a
button on the dialog.
Display a Message
Interactions Use this block to display a simple
message.
Display an Error
Interactions Display an error message to the user.
Editable Panel Actions Display an editable panel dialog to the
user.
© Copyright 2016, Insight Works Page 11
Enter Quantity
Interactions Use this block to prompt the user to enter
quantity. Dialog has options for lot, serial,
expiry and units of measure.
Show Assign LP
Interactions This block is used when assigning a
License Plate to a document and allows
the users to choose which items to use
and the LP actions.
Show LP List
Interactions Use this block to display a list of License
Plates.
Show Picture
Actions Show a picture to the user.
Show Reservations Interactions Displays the Item Tracking dialog for a line
with options to add/modify/delete entries.
© Copyright 2016, Insight Works Page 12
Inspect Context
Interactions This block can be used to view all the
current page variables.
Add Header Label
Actions Add a label to the top of the application
page.
Close Form
Actions Close the form.
Configure Fields
Actions Initializes the application fields. Required
for scan behaviors, finding lines and other
intrinsic behaviors.
Display Mode
Actions Toggle the display mode between grid
and card views.
Find First Line With Actions Find and select the first line in the
grid/panel that matches the value in the
column specified.
© Copyright 2016, Insight Works Page 13
Find a Matching Line
Actions Find a matching line in the grid/panel.
Based on Find Line Templates in NAV.
Open Web
Actions Opens the specified web page.
Run Event
Actions Call a NAV event where you don’t require
a result set to be returned.
Messages/Errors are still displayed if
returned.
Run Event Set Table Field Value
Actions
Run Event Set Value
Actions Call a NAV event to get a value result
returned and populate the application
variable specified with the result.
Run Intent
Actions Executes an Android Intent.
Only usable on Android devices.
Scan Barcode
Actions Simulate a barcode scan
Set Status Bar
Actions Creates and updates the status bar text
© Copyright 2016, Insight Works Page 14
Set Title
Actions Set the title of the application screen.
Show Remaining
Actions Toggle how the ‘open lines/qty’ label is
shown in the top right of a document.
Show Search Control
Actions Create a search/filter bar at top of the
application page.
Start an Application
Actions Launch a new application.
Start Event
Actions Call an internal custom event to execute a
sequence of blocks.
Start License Plate
Actions Trigger the start license plate event and
toggle any associated menus
Stop License Plate
Actions Trigger the stop license plate event and
toggle any associated menus
Update Data
Actions Call a NAV event and expect a result set
back that can either replace the entire
dataset or just update existing lines. New
lines are created/added as well.
Using the PDA Configuration
Context Copy the NAV PDA Configuration settings
to the application context.
Using the Document Header
Context Copy the header values to the application
context. Variables based on column
name.
Using the Last Scanned Barcode Context Copy the last scanned barcodes values to
the application context.
© Copyright 2016, Insight Works Page 15
Using the Selected Line
Context Copy the selected lines values to the
application context. Variables based on
column name.
© Copyright 2016, Insight Works Page 16
5 Designer Event Blocks The designer events are generally triggered either by actions taken by users (scanning
barcodes, pressing menus, etc.) or by specific processes internal to the application
framework (opening or closing an application, loading data, etc.). There should only be
one instance of an event per application and should only be added to the application as
needed.
The following sections will outline each available event and provide a brief example of
how the event can be used.
5.1 After a Row is Selected
5.2 After Item Reservation is Added
This event is triggered after an Item tracking entry has been added via the Show
Reservations block.
When triggered the following variables will available to the user:
• form.VariantCode
o The variant code of the originating line
• form.LotNumber
o The lot number entered by the user
• form.SerialNumber
o The serial number entered by the user
• form.QuantityUserUOM
o The quantity entered by the user
• form.TotalQuantityLineUOM
o The new combined quantity based on line UOM. This will be the original
line quantity to handle + the quantity entered by the user.
• form.QuantityLineUOM
o The quantity entered by the user but converted to the line UOM if
different than the one entered by the user
• form.UnitOfMeasure
o The unit of measure entered by the user
• form.NumberOfLabels
o The number of labels requested (if applicable)
• form.ExpiryDate
o The expiry date entered by the user
5.2.1 After Item Reservation is Added Example
The following blocks illustrate an example of using the “After Item Reservation is Added”
event.
© Copyright 2016, Insight Works Page 17
Application Designer:
5.3 After Item Reservation is Changed
This event is triggered after an Item tracking entry has been modified via the Show
Reservations block.
When triggered the following variables will available to the user:
• form.VariantCode
o The variant code of the originating line
• form.LotNumber
o The lot number modified by the user
• form.SerialNumber
o The serial number modified by the user
• form.QuantityUserUOM
o The quantity entered by the user
• form.TotalQuantityLineUOM
o The new combined quantity based on line UOM. This will be the original
line quantity to handle + the quantity entered by the user – the item
tracking quantity before modification.
• form.QuantityLineUOM
o The quantity entered by the user but converted to the line UOM if
different than the one entered by the user
• form.UnitOfMeasure
o The unit of measure entered by the user
• form.NumberOfLabels
o The number of labels requested (if applicable)
• form.ExpiryDate
o The expiry date entered by the user
© Copyright 2016, Insight Works Page 18
5.3.1 After Item Reservation is Changed Example
The following blocks illustrate an example of using the “After Item Reservation is
Changed” event.
Application Designer:
5.4 After Item Reservation is Deleted
This event is triggered after an Item tracking entry has been deleted via the Show
Reservations block.
When triggered the following variables will available to the user:
• form.VariantCode
o The variant code of the originating line
• form.LotNumber
o The lot number deleted by the user
• form.SerialNumber
o The serial number deleted by the user
• form.TotalQuantityLineUOM
o The new combined quantity based on line UOM. This will be the original
line quantity to handle – the item tracking quantity being deleted.
• form.QuantityLineUOM
o The negative quantity of the item tracking quantity being deleted but
converted to line UOM
• form.UnitOfMeasure
o The unit of measure of the originating line
• form.ExpiryDate
o The expiry date of the item tracking entry
© Copyright 2016, Insight Works Page 19
5.4.1 After Item Reservation is Deleted Example
The following blocks illustrate an example of using the “After Item Reservation is
Deleted” event.
Application Designer:
5.5 Custom Event
The custom event block is triggered by one of two ways:
1. A PDA Menu with a standard action of: “Application Event”
a. The event to trigger is specified in the “Custom 1” field on the menu
2. Using a “Start Event” block
You can use this block to tie menu actions to custom processes as well as making the
application design more readable and re-usable.
Block Configuration:
Option Description
Name The name of the event. This will be referenced in the “Custom 1” field on
a PDA menu or the “Event Name” configuration option on the “Start
Event” block.
5.5.1 Custom Event Example
The following blocks illustrate an example of using the “Custom Event” event.
Application Designer:
© Copyright 2016, Insight Works Page 20
5.6 When a Bin is Scanned
This event is triggered when a Bin barcode is scanned. This event will be fired after the
barcode has been validated by NAV (if required). You will need to handle the actions to
take (if any) when a Bin is scanned. Typically, you would include a “Using the Last
Scanned Barcode” block to push the Bin barcode variables into the page context and
then take appropriate action from there.
5.6.1 When a Bin is Scanned Example
The following blocks illustrate an example of using the “When a Bin is Scanned” event.
Application Designer:
© Copyright 2016, Insight Works Page 21
5.7 When a Document is Scanned
This event is triggered when a Document barcode is scanned. Document barcode
formats are fixed and are always preceded by a unique type identifier. If you are
intending to scan a document that does not have the identifiers present then it will need
to be interpreted as a “Text” barcode.
You will need to handle the actions to take (if any) when a Document is scanned.
Typically, you would include a “Using the Last Scanned Barcode” block to push the
Document barcode variables into the page context and then take appropriate action
from there.
5.7.1 When a Document is Scanned Example
The following blocks illustrate an example of using the “When a Document is Scanned”
event.
Application Designer:
5.8 When a License Plate is Scanned
This event is triggered when a License Plate barcode is scanned. This event will be fired
after the barcode has been validated by NAV. You will need to handle the actions to
take (if any) when a License Plate is scanned. Typically, you would include a “Using the
Last Scanned Barcode” block to push the License Plate barcode variables into the page
context and then take appropriate action from there.
© Copyright 2016, Insight Works Page 22
5.8.1 When a License Plate is Scanned Example
The following blocks illustrate an example of using the “When a License Plate is Scanned”
event.
Application Designer:
5.9 When a License Plate is Started
This event is triggered when a PDA menu with a standard action of “LP Create” is
pressed. The application internally will keep track of the menu state and toggle it
between ‘start’ and ‘stop’ so depending on what state the menu is in this or the “When a
License Plate is Stopped” event will be triggered.
You will need to handle the actions to take (if any) when the request is made.
5.9.1 When a License Plate is Started Example
The following blocks illustrate an example of using the “When a License Plate is Started”
event.
Application Designer:
© Copyright 2016, Insight Works Page 23
5.10 When a License Plate is Stopped
This event is triggered when a PDA menu with a standard action of “LP Create” is
pressed. The application internally will keep track of the menu state and toggle it
between ‘start’ and ‘stop’ so depending on what state the menu is in this or the “When a
License Plate is Started” event will be triggered.
© Copyright 2016, Insight Works Page 24
You will need to handle the actions to take (if any) when the request is made.
5.10.1 When a License Plate is Stopped Example
The following blocks illustrate an example of using the “When a License Plate is Stopped”
event.
Application Designer:
5.11 When a License Plate Template is Scanned
This event is triggered when a License Plate Template barcode is scanned. You will need
to handle the actions to take (if any) when a License Plate Template is scanned. Typically,
you would include a “Using the Last Scanned Barcode” block to push the License Plate
Template barcode variables into the page context and then take appropriate action from
there.
5.11.1 When a License Plate Template is Scanned Example
The following blocks illustrate an example of using the “When a License Plate is Scanned”
event.
© Copyright 2016, Insight Works Page 25
Application Designer:
5.12 When a Location is Scanned
This event is triggered when a Location barcode is scanned. This event will be fired after
the barcode has been validated by NAV. You will need to handle the actions to take (if
any) when a Location is scanned. Typically, you would include a “Using the Last Scanned
Barcode” block to push the Location barcode variables into the page context and then
take appropriate action from there.
5.12.1 When a Location is Scanned Example
The following blocks illustrate an example of using the event.
Application Designer:
5.13 When a Tag is Scanned
This event is triggered when a Tag barcode is scanned. You will need to handle the
actions to take (if any) when a Tag is scanned. Typically, you would include a “Using the
Last Scanned Barcode” block to push the Tag barcode variables into the page context
and then take appropriate action from there.
5.13.1 When a Tag is Scanned Example
The following blocks illustrate an example of using the “When a Tag is Scanned” event.
Application Designer:
© Copyright 2016, Insight Works Page 26
5.14 When an Item is Scanned
This event is triggered when an Item barcode is scanned. This event will be fired after
the barcode has been decoded/processed in NAV. You will need to handle the actions
to take (if any) when an Item is scanned. Typically, you would include a “Using the Last
Scanned Barcode” block to push the Item barcode variables into the page context and
then take appropriate action from there.
This event is integrated with the “scan quantity change” scan behaviors defined in NAV.
Note: For more information in Item decoding please reference the Warehouse Insight
documentation or contact support.
5.14.1 When an Item is Scanned Example
The following blocks illustrate an example of using the “When an Item is Scanned”
event.
Application Designer:
Note: For more information on Scan Behaviors reference the Warehouse Insight
documentation.
© Copyright 2016, Insight Works Page 27
5.15 When Loading Document Data
If this block is added the application will automatically present a Data Grid or Card Panel
to the user. This block will be triggered immediately after the “When the Form Opens”.
In addition the event can be triggered by an “Update Data…” block.
Typically the only action required in this event is to get the dataset from NAV so that the
grid can be populated.
5.15.1 When Loading Document Data Example
The following blocks illustrate an example of using the “When Loading Document Data”
event.
Application Designer::
Note: See the “Update Data” block for an example of how to return data to the
handheld.
5.16 When Quantity Should Change on a Row
This event is only triggered when a menu option with a standard action of “Change Qty”
is pressed. This event is meant for manual quantity changes for a selected line and is
integrated with the “manual quantity change” scan behaviors defined in NAV.
5.16.1 When Quantity Should Change on a Row Example
The following blocks illustrate an example of using the “When Quantity Should Change
on a Row” event.
Application Designer:
© Copyright 2016, Insight Works Page 28
Note: For more information on Scan Behaviors reference the Warehouse Insight
documentation.
5.17 When Text is Scanned
This event is triggered when a text barcode is scanned. A “text barcode” is a barcode
that is not decodable as anything else (Item, Bin, LP, document, etc.). The process flow
internally will be to first attempt to decode the text barcode as an Item or Bin. If those
fail then this event will be raised.
You will need to handle the actions to take (if any) when a Text barcode is scanned.
Typically, you would include a “Using the Last Scanned Barcode” block to push the text
barcode variables into the page context and then take appropriate action from there.
The variables added as a result of the “Using the last scanned barcode” are:
Note: If this block is not present an error will be displayed indicating that the barcode
could not be decoded as a valid Item barcode.
5.17.1 When Text is Scanned Example
The following blocks illustrate an example of using the “When Text is Scanned” event.
© Copyright 2016, Insight Works Page 29
Application Designer:
5.18 When the Form Closes
This event is triggered just prior to the application closing. You may take additional
action at this point (posting, printing, etc.) but you will not be able to prevent the page
from being closed.
5.18.1 When the Form Closes Example
The following blocks illustrate an example of using the “When the Form Closes” event.
Application Designer:
5.19 When the Form Opens
The “When the Form Opens” event is triggered when the application first loads. The
event is only ever fired once and should be used to initialize the application. For
example setting the form title, initializing variables, etc. For simple processes (like asking
users for input and then closing the form) this event should be considered the starting
point.
5.19.1 When the Form Opens Example
The following blocks illustrate an example of using the “When the Form Opens” event.
© Copyright 2016, Insight Works Page 30
Application Designer:
© Copyright 2016, Insight Works Page 31
6 Designer Interaction Blocks 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.
6.1 Ask for a Date
The “Ask for a Date” block is used to display a dialog to the user asking 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:
© Copyright 2016, Insight Works Page 32
When closed the user will still need to press ‘OK’ again to accept the value previously
selected.
© Copyright 2016, Insight Works Page 33
After execution the following variables will be set:
• dialog_result
o Will be “0” if “Cancel” pressed, “1” if “OK” pressed
• action_result
o Will contain the date entered as displayed
• date_universal
o Will contain the date formatted to universal full date/time format
Note: The time portion will always be midnight.
© Copyright 2016, Insight Works Page 34
6.1.1 Ask for a Date Example
Provided below is an example of using the “Ask for a Date” block.
Application Designer:
6.2 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.
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
© Copyright 2016, Insight Works Page 35
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:
After execution the following variables will be set:
• dialog_result
© Copyright 2016, Insight Works Page 36
o Will be “0” if “Cancel” pressed, “1” if “OK” pressed
• action_result
o Will contain the value entered
6.2.1 Ask for a Number Example
Provided below is an example of using the “Ask for a Number” block.
Application Designer:
6.3 Ask for Confirmation
The “Ask for Confirmation” block is used to display a dialog to the user asking for
confirmation (yes/no).
Block Configuration:
Option Description
© Copyright 2016, Insight Works Page 37
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:
After execution the following variables will be set:
• dialog_result
o Will be “7” if “No” pressed, “6” if “Yes” pressed
© Copyright 2016, Insight Works Page 38
6.3.1 Ask for Confirmation Example
Provided below is an example of using the “Ask for Confirmation” block.
Application Designer:
6.4 Ask for Text
The “Ask for a Text” block is used to display a dialog to the user asking for a text value.
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
In addition to the published configuration options there are a few variables that can be
created/set to help further override the dialog behavior:
© Copyright 2016, Insight Works Page 39
Overrides:
Option Description
override_decode_scans If this variable is defined in the application it will determine if a
barcode scan should follow the normal decoding processes. For
example if the value is set to ‘true’ and a License Plate barcode is
scanned (e.g. %LP%LP00001) it will call NAV functions to determine
if the LP is valid and retrieve the License Plate lines and details.
This extra processing is sometimes not required. If the value is set
to ‘false’ the text field will just get the License Plate number (e.g.
LP00001) and set that in the text field. The default value is ‘true’.
When executed users will see a dialog similar to this:
After execution the following variables will be set:
© Copyright 2016, Insight Works Page 40
• dialog_result_int
o Will be “0” if “Cancel” pressed, “1” if “OK” pressed
• action_result
o Will contain the value entered
6.4.1 Ask for Text Example
Provided below is an example of using the “Ask for Text block.
Application Designer:
6.5 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.
Block Configuration:
Option Description
© Copyright 2016, Insight Works Page 41
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:
After execution the following variables will be set:
• dialog_result
o Will be “0” if “Cancel” pressed, “1” if “OK” pressed
• signature_name
o Will contain the name typed in
• blob
o The signature data
© Copyright 2016, Insight Works Page 42
6.5.1 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:
NAV Code:
6.6 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.
© Copyright 2016, Insight Works Page 43
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:
Selecting the entry will cause the list options to appear:
© Copyright 2016, Insight Works Page 44
After execution the following variables will be set:
• dialog_result
o Will be “0” if “Cancel” pressed, “1” if “OK” pressed
• selection
o Will be the index of the selection made (0 being the first option)
• selection_text
o Will be the text of the selection made
6.6.1 Choose From List Example
Provided below is an example of using the “Choose From List” block.
Application Designer:
© Copyright 2016, Insight Works Page 45
6.7 Choose From Table
The “Choose From Table” block is used to display a dialog to the user asking for a
selection from grid.
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
© Copyright 2016, Insight Works Page 46
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:
After execution the following variables will be set:
• dialog_result
o Will be “0” if “Cancel” pressed, “1” if “OK” pressed
• action_result.FieldName
o Every field on the selected row will be returned with the “FieldName”
replaced as needed
6.7.1 Choose From Table Example – Table Filters
Provided below is an example of using the “Choose From Table” block.
© Copyright 2016, Insight Works Page 47
Application Designer:
6.7.2 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:
© Copyright 2016, Insight Works Page 48
NAV Code:
PDA Columns:
© Copyright 2016, Insight Works Page 49
6.8 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.
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:
© Copyright 2016, Insight Works Page 50
Note: A “Cancel” button will always be added as the last available button.
After execution the following variables will be set:
• dialog_result
o Will be “0” if “Cancel” pressed, “1” if “OK” pressed
• selection
o Will be the index of the selection made (0 being the first option)
• selection_text
o Will be the text of the selection made
6.8.1 Choose With Buttons Example
Provided below is an example of using the “Choose With Buttons” block.
© Copyright 2016, Insight Works Page 51
Application Designer:
6.9 Display a Message
The “Display a Message” block is used to display a message to the user.
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:
© Copyright 2016, Insight Works Page 52
Note: The dialog is non-blocking. Therefore any blocks that follow this will be
executed even if the message is still being shown.
6.9.1 Display a Message Example
Provided below is an example of using the “Display a Message” block.
Application Designer:
© Copyright 2016, Insight Works Page 53
6.10 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.
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:
© Copyright 2016, Insight Works Page 54
Note: The dialog is non-blocking. Therefore any blocks that follow this will be
executed even if the message is still being shown.
6.10.1 Display an Error Example
Provided below is an example of using the “Display an Error” block.
Application Designer:
© Copyright 2016, Insight Works Page 55
6.11 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.
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:
© Copyright 2016, Insight Works Page 56
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”.
© Copyright 2016, Insight Works Page 57
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.
6.11.1 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:
NAV Code:
PDA Columns:
© Copyright 2016, Insight Works Page 58
Example Output:
6.11.2 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:
© Copyright 2016, Insight Works Page 59
NAV Code:
PDA Columns:
© Copyright 2016, Insight Works Page 60
6.12 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”.
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:
© Copyright 2016, Insight Works Page 61
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:
© Copyright 2016, Insight Works Page 62
After execution the following variables will be set:
• dialog_result
o Will be “0” if “Cancel” pressed, “1” if “OK” pressed
• form.LotNumber
o The Lot Number entered in the dialog
• form.SerialNumber
o The Serial Number entered in the dialog
• form.QuantityUserUOM
o The quantity entered in the dialog
• form.QuantityLineUOM
o The quantity entered in the dialog converted to the line UOM
• form.TotalQuantityLineuOM
o The quantity entered in the dialog (converted to the line UOM) plus the
existing quantity to handle (as specified in the Configure Fields block)
• form.UnitOfMeasure
© Copyright 2016, Insight Works Page 63
o The unit of measure chosen in the dialog
• form.NumberOfLabels
o The number of labels requested
• form.ExpiryDate
o The expiry date specified in the dialog
6.12.1 Enter Quantity Example
Provided below is an example of using the “Enter Quantity” block.
Application Designer:
6.13 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.
Block Configuration:
Option Description
© Copyright 2016, Insight Works Page 64
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:
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.
© Copyright 2016, Insight Works Page 65
6.13.1 Show Assign LP Example
Provided below is an example of using the “Show Assign LP” block.
Application Designer:
6.14 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.
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.
© Copyright 2016, Insight Works Page 66
When executed users will see a dialog similar to this:
After execution the following variables will be set:
• dialog_result
o Will be “0” if “Cancel” pressed, “1” if “OK” pressed
• action_result
o The License Plate number selected
6.14.1 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.
© Copyright 2016, Insight Works Page 67
Application Designer:
6.15 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.
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:
© Copyright 2016, Insight Works Page 68
Note: If there is no image the dialog will not be displayed.
6.15.1 Show Picture Example
Provided below is an example of using the “Show Picture” block.
Application Designer:
© Copyright 2016, Insight Works Page 69
6.16 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.
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.
© Copyright 2016, Insight Works Page 70
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:
See the events “After Item Reservation is Added”, “After Item Reservation is Changed”
and “After Item Reservation is Deleted” for expected outputs.
6.16.1 Show Reservations 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.
© Copyright 2016, Insight Works Page 71
6.17 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.
When executed users will see a dialog similar to this:
© Copyright 2016, Insight Works Page 72
Note: Pressing “Cancel” will abort any subsequent block execution.
6.17.1 Inspect Context Example
Provided below is an example of using the “Inspect Context” block.
Application Designer:
© Copyright 2016, Insight Works Page 73
© Copyright 2016, Insight Works Page 74
7 Designer Action Blocks 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.
7.1 Add Header Label
Use the “Add Header Label” block to add instructions to the top of the application.
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.
7.1.1 Add Header Label Example
Provided below is an example of using the “Add Header Label” block.
Application Designer:
© Copyright 2016, Insight Works Page 75
Example Output:
© Copyright 2016, Insight Works Page 76
7.2 Close Form
Use the “Close Form” block to close the application.
Note: This will also trigger the “When the Form Closes” event.
7.2.1 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:
7.3 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.
© Copyright 2016, Insight Works Page 77
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
© Copyright 2016, Insight Works Page 78
Note: Not all fields will be required for all instances/applications.
7.3.1 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:
7.4 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.
Block Configuration:
© Copyright 2016, Insight Works Page 79
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”:
© Copyright 2016, Insight Works Page 80
Example of “Card View”:
7.4.1 Display Mode Example
Provided below is an example of using the “Display Mode” block.
Application Designer:
© Copyright 2016, Insight Works Page 81
7.5 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.
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
o Will be “True” if the record was found, “False” if not found.
© Copyright 2016, Insight Works Page 82
7.5.1 Find First Line With Example
Provided below is an example of using the “Find First Line With” block.
Application Designer:
7.6 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.
After execution the following variables will be set:
• found
o 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.
7.6.1 Find a Matching Line Example
Provided below is an example of using the “Find a Matching Line” block.
Application Designer:
© Copyright 2016, Insight Works Page 83
7.7 Open Web
Use the “Open Web” block to open a specified web page.
Block Configuration:
Option Description
URL The URL to open. Must be fully specified (e.g. include the ‘http’).
7.7.1 Run Event Example
Provided below is an example using the “Open Web” block.
Application Designer:
7.8 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.
Block Configuration:
© Copyright 2016, Insight Works Page 84
Option Description
Event ID The NAV event to call. All context params are sent to NAV as part of the
request.
7.8.1 Run Event Example
Provided below is an example of using the “Run Event” block.
Application Designer:
NAV Code:
Example Output:
© Copyright 2016, Insight Works Page 85
7.9 Run Event Set Table Field Value
The “Run Event Set Table Field Value” block can be used to update a table field without
the need to write custom code.
Block Configuration:
Option Description
© Copyright 2016, Insight Works Page 86
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 will be used to filter the table.
The Filter Fields must be defined as variables prior to block execution
and the filter values set accordingly.
In addition to the block configuration a variable named “action_result” must be created
and set to the value you want to update the field with.
Note: Often the “action_result” field will be created and set as part of another blocks
execution. For example the “Ask for a Number” block.
7.9.1 Run Event Set Table Field Value Example
Provided below is an example of using the “Run Event Set Table Field Value” block.
Application Designer:
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”.
7.10 Run Event Set Value
Use the “Run Event Set Value” block to call NAV and populate the application variable
with the response.
© Copyright 2016, Insight Works Page 87
Block Configuration:
Option Description
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
7.10.1 Run Event Set Value Example
Provided below is an example of using the “Run Event Set Value” block.
Application Designer:
NAV Code:
Example Output:
© Copyright 2016, Insight Works Page 88
7.11 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.
Block Configuration:
Option Description
© Copyright 2016, Insight Works Page 89
Barcode The barcode to scan. This needs to include any prefix information as
well. E.g. %LP%LP123456.
7.11.1 Scan Barcode Example
Provided below is an example of using the “Scan Barcode” block.
Application Designer:
7.12 Run Intent
Use the “Run Intent” block to execute an Android Intent. This block is only usable by
Android devices currently.
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
© Copyright 2016, Insight Works Page 90
7.12.1 Run Event Set Value Example
Provided below is an example of using the “Run Intent” block.
Application Designer:
7.13 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.
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.
7.13.1 Set Status Bar Example
Provided below is an example of using the “Set Status Bar” block.
Application Designer:
© Copyright 2016, Insight Works Page 91
7.14 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.
Block Configuration:
Option Description
Expression The title to set for the page
7.14.1 Set Title Example
Provided below is an example of using the “Set Title” block.
Application Designer:
7.15 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.
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:
© Copyright 2016, Insight Works Page 92
7.15.1 Show Remaining Example
Provided below is an example of using the “Show Remaining” block.
Application Designer:
© Copyright 2016, Insight Works Page 93
7.16 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.
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:
© Copyright 2016, Insight Works Page 94
7.16.1 Show Search Control Example
Provided below is an example of using the “Show Search Control” block.
© Copyright 2016, Insight Works Page 95
7.17 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.
Block Configuration:
Option Description
Application Name The application name to launch
7.17.1 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:
7.18 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.
Block Configuration:
Option Description
© Copyright 2016, Insight Works Page 96
Event Name The custom event to execute
7.18.1 Start Event Example
Provided below is an example of using the “Start Event” block.
Application Designer:
7.19 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.
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.
7.19.1 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:
© Copyright 2016, Insight Works Page 97
7.20 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.
Note: This block functions the same as pressing a menu with the standard action of
“LP Create” where the current state is license plating.
7.20.1 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:
7.21 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.
© Copyright 2016, Insight Works Page 98
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.
7.21.1 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:
NAV Code:
© Copyright 2016, Insight Works Page 99
PDA Columns:
Example Output:
© Copyright 2016, Insight Works Page 100
© Copyright 2016, Insight Works Page 101
8 Designer Context Blocks The designer context blocks are primarily responsible for putting data into the global
context so that they can be referenced by the application blocks or NAV.
The following sections will outline each available context and provide a brief example of
how the block can be used.
8.1 Using the Selected Line
The “Using the Selected Line” block is intended for applications that are displaying a data
grid (or card panel). This block will take the currently selected line (or panel) and will add
each column from the underlying dataset to the context. Variable names will match the
column name.
Note: You can use the “Inspect Context” block to view available variable names.
8.1.1 Using the Selected Line Example
Provided below is an example of using the “Using the Selected Line” block. The
application loads an item list of data and once loaded displays a message indicating the
selected item number.
Application Designer:
© Copyright 2016, Insight Works Page 102
8.2 Using the Document Header
The “Using the Document Header” block is intended for applications that are displaying
a data grid (or card panel). This block will take the current document data “header”
information and add each column from the dataset to the global context. Variable
names will match the column name.
8.2.1 Using the Document Header Example
Provided below is an example of using the “Using the Document Header” block. The
application loads a warehouse receipt document and once loaded displays a message
indicating the receipt document number.
Application Designer:
8.3 Using the PDA Configuration
The “Using the PDA Configuration” block pushes all the NAV PDA Configuration options
into the global context so they can be referenced as needed. In addition, information
© Copyright 2016, Insight Works Page 103
concerning the current location is also made available (bins mandatory, require picks,
etc.)
Note: You can use the “Inspect Context” block to view available variable names. If you
are unsure which variable matches up to which pda configuration option contact support
for assistance.
8.3.1 Using the PDA Configuration Example
Provided below is an example of using the “Using the PDA Configuration” block.
Application Designer:
8.4 Using the Last Scanned Barcode
The “Using the Last Scanned Barcode” block pushes the last barcode data into the global
context. The context that is created depends on the type of barcode and are listed
below. Typically, this block is used when responding to a barcode scan event (See
Designer Events for more information).
Barcode Context:
Barcode Type Context Created
License Plate • barcode.LicenseNumber
o The License Plate number
© Copyright 2016, Insight Works Page 104
• barcode.LPBinCode
o The bin code on the License Plate
• barcode.LPLineCount
o The number of lines on the License Plate
• barcode.SourceNumber
o The Source No. the License Plate is assigned to
• barcode.Status
o The License Plate status
• barcode.OriginalBarcode
o The License Plate number
• barcode.Type
o Will be “LPBarcode”
Document • Purchase Order
o barcode.DocumentNumber
▪ The purchase order number
o barcode.Type
▪ Will be “PurchaseBarcode”
• Sales Order
o barcode.DocumentNumber
▪ The sales order number
o barcode.Type
▪ Will be “SalesBarcode”
• Warehouse Shipment
o barcode.DocumentNumber
▪ Will be the warehouse shipment number
o barcode.Type
▪ Will be “ShipmentBarcode”
• Warehouse Receipt
o barcode.DocumentNumber
▪ Will be the warehouse receipt number
o barcode.Type
▪ Will be “ReceiptBarcode”
• Transfer Order
o barcode.DocumentNumber
▪ Will be the transfer order number
o barcode.Type
▪ Will be “TransferBarcode”
• Count Sheet
o barcode.DocumentNumber
▪ Will be the sheet name
o barcode.SheetNumber
▪ Will be the sheet name
o barcode.Type
▪ Will be “CountBarcode”
• Production Order
o barcode.DocumentNumber
▪ Will be the production order number
o barcode.ProdOrderNumber
▪ Will be the production order number
o barcode.ProdOrderLineNumber
▪ Will be the production order line number
o barcode.Operation
▪ Will be the operation number (if specified in
barcode)
o barcode.SerialNumber
▪ Will be the serial number (if specified in barcode)
o barcode.LotNumber
▪ Will be the lot number (if specified in barcode)
o barcode.SerialTracked
▪ Will be true if serial number specified in barcode
o barcode.LotTracked
© Copyright 2016, Insight Works Page 105
▪ Will be true if lot number specified in barcode
o barcode.Type
▪ Will be “ProductionBarcode”
• Warehouse Activity
o barcode.DocumentNumber
▪ Will be the warehouse activity number
o barcode.ActivityNumber
▪ Will be the warehouse activity number
o barcode.WhseActivityType
▪ Will be the type of activity
o barcode.Type
▪ Will be “ActivityBarcode”
Bin • barcode.BinNumber
o The Bin code
• barcode.OriginalBarcode
o The Bin code
• barcode.Type
o Will be “BinBarcode”
Text • barcode.OriginalBarcode
o The barcode that was scanned
• barcode.Type
o Will be “TextOnlyBarcode”
Tag • barcode.TagBinCode
o The Bin code in the tag barcode
• barcode.ShelfNumber
o The Shelf number in the tag barcode
• barcode.OriginalBarcode
o The tag barcode scanned
• barcode.Type
o Will be “TagBarcode”
LP Template • barcode.TemplateName
o The template name
• barcode.OriginalBarcode
o The template name
• barcode.Type
o Will be “LPTemplateBarcode”
Location • barcode.LocationCode
o The location code
• barcode.LocationName
o The location name
• barcode.BinsMandatoryInLocation
o True if the location requires bins
• barcode.RequireReceive
o True if the location requires receipts
• barcode.RequireShipment
o True if the location requires shipments
• barcode.RequirePutAways
o True if the location requires put-aways
• barcode.RequirePicks
o True if the location requires picks
• barcode.DirectedPicksAndPutAways
o True if the location is directed
• barcode.OriginalBarcode
o The location code
• barcode.Type
© Copyright 2016, Insight Works Page 106
o Will be “LocationBarcode”
Item • barcode.BarcodeQuantity
o The quantity returned from the Item decoding
• barcode.BaseUnitOfMeasure
o The Items base unit of measure code
• barcode.BinCode
o The bin returned from the Item decoding
• barcode.BinQuantity
o The bin quantity returned from the Item decoding
• barcode.Custom1
o The Custom 1 value returned from the Item decoding
• barcode.Custom2
o The Custom 2 value returned from the Item decoding
• barcode.Custom3
o The Custom 3 value returned from the Item decoding
• barcode.Description
o The Items Description
• barcode.Description2
o The Items Description 2
• barcode.ExpirationDate
o The expiration date returned from the Item decoding
• barcode.ItemCategoryCode
o The Items Item Category Code
• barcode.ItemNumber
o The Item number
• barcode.ItemTrackingCode
o The Items Item Tracking Code
• barcode.LotNumber
o The lot number returned from the Item decoding
• barcode.ProductGroupCode
o The Items Product Group Code
• barcode.PurchaseUnitOfMeasure
o The Items Purchase Unit of Measure Code
• barcode.PutAwayUnitOfMeasure
o The Items Put-away Unit of Measure Code
• barcode.SalesUnitOfMeasure
o The Items Sales Unit of Measure Code
• barcode.SerialNumber
o The serial number returned from the Item decoding
• barcode.Type
o Will be “ItemBarcode”
• barcode.OriginalBarcode
o Will be the barcode the user scanned
• barcode.UnitOfMeasure
o The unit of measure returned from the Item decoding
• barcode.VariantCode
o The variant code returned from the Item decoding
Note: Item barcodes also produce additional context based on Item Tracking Code
configuration. To view the additional context use the “Inspect Context” or contact support.
8.4.1 Using the Last Barcode Scanned Example
Provided below is an example of using the “Using the Last Barcode Scanned” block to
display some information about the item scanned.
© Copyright 2016, Insight Works Page 107
Application Designer:
© Copyright 2016, Insight Works Page 108
9 Designer Variable Blocks 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”.
9.1 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.
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.
9.1.1 Variable Example
Provided below is an example of using the “Variable” block to reference a PDA
Configuration context variable.
Application Designer:
© Copyright 2016, Insight Works Page 109
9.2 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.
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
9.2.1 Set Variable Example
Provided below is an example of using the “Set Variable” block to create a new custom
variable.
Application Designer:
© Copyright 2016, Insight Works Page 110
9.3 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.
9.3.1 Integer Variable Example
Provided below is an example of using the “Integer Variable” block.
Application Designer:
9.4 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.
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.
9.4.1 Text Variable Example
Provided below is an example of using the “Text Variable” block.
Application Designer:
© Copyright 2016, Insight Works Page 111
9.5 Boolean Variable
Use the “Boolean” block to indicate a True or False variable.
9.5.1 Boolean Example
Provided below is an example of using the “Boolean” block.
9.6 Known Event Variable
Use the “Known Event” block to choose a pre-existing Event ID by name.
The known event options are automatically populated based on the “Events” page in
NAV.
9.6.1 Known Event Example
Provided below is an example of using the “Known Event” block.
9.7 Dialog Result Variable
Use the “Dialog Result” block to check for a dialog result by name rather than integer.
Available options are:
© Copyright 2016, Insight Works Page 112
• 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.
9.7.1 Dialog Result Example
Provided below is an example of using the “Dialog Result” block.
9.8 Evaluate Number
The “Evaluate Number” block is used to complete simple math expressions and then
feed the result into other inputs.
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
© Copyright 2016, Insight Works Page 113
9.8.1 Evaluate Number Example
Provided below is an example of using the “Evaluate Number” block.
Application Designer:
9.9 Evaluate Text
The “Evaluate Text” block is used to string replace variables into text expressions and
then feed the result into other inputs.
Block Configuration:
© Copyright 2016, Insight Works Page 114
Option Description
Expression The expression to evaluate. Should be a string variable with
references to variable names inside brackets [].
9.9.1 Evaluate Text Example
Provided below is an example of using the “Evaluate Text” block.
Application Designer:
9.10 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.
Note: Specific item tracking settings (e.g. purchase inbound, sales outbound) can also
be referenced from the context.
9.10.1 Is any lot tracked Example
Provided below is an example of using the “Is any lot tracked” block.
Application Designer:
© Copyright 2016, Insight Works Page 115
9.11 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.
Note: Specific item tracking settings (e.g. purchase inbound, sales outbound) can also
be referenced from the context.
9.11.1 Is any serial tracked Example
Provided below is an example of using the “Is any serial tracked” block.
Application Designer:
© Copyright 2016, Insight Works Page 116
10 Designer Logic Blocks The designer logic blocks are used to control process flow through the application.
The following sections will outline each available action and provide a brief example of
how the action can be used.
10.1 IF Block
The “IF” block is used when you want to check a condition and if true then execute some
additional logic.
Block Configuration:
Option Description
if The condition to check
do Place any additional blocks you want executed when the “if” condition is
true.
Note: You may use the to add/remove additional conditional if/else sequences.
10.1.1 IF Block Example
Provided below is an example of using the “IF” block.
© Copyright 2016, Insight Works Page 117
10.2 IF – ELSE Block
The “IF - ELSE” block is used when you want to check a condition and if true then execute
some additional blocks and if it’s false then execute some other blocks.
Block Configuration:
Option Description
if The condition to check
do Place any additional blocks you want executed when the “if” condition is
true.
else Place any additional blocks you want executed when the “if” condition is
false.
10.2.1 IF-ELSE Block Example
Provided below is an example of using the “IF-ELSE” block.
10.3 IF – ELSE IF – ELSE
The “IF – ELSE - IF” block is used when you want to check a condition and if true then
execute some additional blocks and if it’s false then perform another check and if that is
true execute some other blocks otherwise execute some other blocks.
© Copyright 2016, Insight Works Page 118
Block Configuration:
Option Description
if The condition to check
do Place any additional blocks you want executed when the “if” condition is
true.
else if The second condition to check if the first check is false.
do Place any additional blocks you want executed if the “else if” condition is
true.
else Place any additional blocks you want executed when the “else if”
condition is false.
Note: This is maximum condition depth that can be checked. If you need additional
checks you must structure the code in different ways.
10.3.1 IF - ELSE IF – ELSE Block Example
Provided below is an example of using the “IF-ELSE IF - ELSE” block.
© Copyright 2016, Insight Works Page 119
10.4 Comparison Block
The “Comparison” Block is used to compare two variables and returns true or false
depending on the comparison results.
Block Configuration:
Option Description
<left side> The first variable to compare
<right side> The second variable to compare
Operator “=” return true if the variables are equal, otherwise false
“≠” return true if the variables are not equal, otherwise false
“<” return true if the left side variable is less than the right side,
otherwise false
“≤” return true if the left side variable is less than or equal to the right
side, otherwise false.
“>” return true if the left side variable is greater than the right side,
otherwise false
“≥” return true if the left side variable is greater than or equal to the
right side, otherwise false
© Copyright 2016, Insight Works Page 120
10.4.1 Comparison Block Example
Provided below is an example of using the “Comparison” block.
10.5 Logical Comparison Block
The “Logical Comparison” Block is used to compare two variables and returns true or
false depending on the logical comparison results.
Block Configuration:
Option Description
<left side> The first variable to compare
<right side> The second variable to compare
Operator “and” return true if both variables are true, otherwise false
“or” return true if either variable is true, otherwise false
10.5.1 Logical Comparison Block Example
Provided below is an example of using the “Logical Comparison” block.
© Copyright 2016, Insight Works Page 121
10.6 Not Block
Use the “Not” block to reverse/negate a Boolean variable. This block must be used in
conjunction with another variable.
Block Configuration:
Option Description
<input> The variable to negate
10.6.1 Not Block Example
Provided below is an example of using the “Not” block.
© Copyright 2016, Insight Works Page 122
A PDA Menus PDA Menus are integral to the Application Development process. Menus define their
interactions with Applications via the “Standard Action” property. Each of the standard
actions are briefly described below where they directly pertain to Application
interactions. For a more complete discussion reference the Warehouse Insight help.
Standard Actions:
Standard Action Description
Close This will close the application and fire the “When the Form Closes” event.
Change Qty This will trigger the “When Quantity Should Change on a Row” event.
LP Create Triggers the “When a License Plate is Started” or “When a License Plate is
Stopped” events. Updates the menu text accordingly.
Application Event Will fire the “Custom Event” defined in the “Custom 1” field.
© Copyright 2016, Insight Works Page 123
B Extension Codeunits Inevitably when designing an application you will need to handle data requests in NAV.
This document has provided examples of NAV code where required. Typically the code
will be contained in an Extension Codeunit. To start with you should export codeunit
23044539 (WMDM Extension Template) and renumber to something in your available
range (e.g. 50000+).
For new applications you will be using the “onBeforeProcessEvent” and all of your event
ID’s should be in the 2 million range to avoid licensing issues.
Example:
Note: For more information on extension codeunits reference the support portal or
contact product support.