How-to: Create a Lookup including Unplanned Function (BC)
Description
The user wants to create two pages that can:
- Display a list of entries using a Lookup Function
- Make registrations regarding the lookup entry using an Unplanned Function
Selecting a lookup entry will navigate to the unplanned function.
Use cases
- You want to search for and display a list of outstanding "items" to "handle".
- When you have handled each item, you want that item to disappear from the list and proceed to the next item.
or
- You want to search for and display a list of Jobs.
- Select one or more job and make registrations of Items or Hours etc. spent on that job.
How to enable it
To achieve this, changes in both the application.cfg and the backend are needed:
Step 1 - Changes in the application.cfg
In the application.cfg, we need to define the pages needed.
- Step 1.1 Defining the Lookup page
<page id="MyLookup" type="Lookup" icon="mainmenuscaninfo"> <title defaultValue="Titel"/> <lookupConfiguration type="MyLookup"> <header configurationKey="MyLookup" automaticAcceptOnOpen="true" /> <onResultSelected enabled="true" refreshOnSuccess="true" navigateTo="MyItemReg"/> <list listId="Lookup" /> </lookupConfiguration> <actions> <open id="MyItemReg" icon="mainmenusettings" title="My UnplannedItemRegistration"> <transfer property="LookupSelectedResult" to="UnplannedItemRegistrationInputValue"></transfer> <returnTransfer property="UnplannedItemRegistrationCompleted" to="RefreshOnResume"/> </open> </actions> </page>
- Step 1.2 Define the Unplanned page
<page id="MyItemReg" type="UnplannedItemRegistration" icon="mainmenuscaninfo"> <title defaultValue="Titel"/> <unplannedItemRegistrationConfiguration type="MyItemReg" includeInputDataRowInSubmitRequest="true" useRegistrationCollector="true"> <header configurationKey="MyItemReg" clearAfterPost="true" automaticAcceptOnOpen="true" automaticAcceptAfterLastScan="true"/> <onSuccessfulPost close="true" /> </unplannedItemRegistrationConfiguration> </page>
- Step 1.3 Add the main menu items
<!-- PAGES --> <pages> <page id="MainMenu" type="Menu" icon="icon"> <title defaultValue="Mobile WMS" /> <menuConfiguration> <menuItems> ... <menuItem id="MyLookup" displayName="MyLookup" icon="mainmenumove-unplanned" alwaysEnabled="true"/> <menuItem id="MyItemReg" displayName="MyItemReg" icon="mainmenushipping" alwaysEnabled="true"/> ...
Read more about the Page Mobile configuration in the application.cfg here
Step 2 - Handling the back-end
After having modified the application.cfg, the next set of steps are about handling the back-end.
Step 2.1 Create header fields for both the lookup and the unplanned pages.
Use OnGetReferenceData_OnAddHeaderConfigurations - The value that the user inputs will transfer to the Unplanned page, this is because both pages share the same Headerfield name, "ID"
- Step 2.2 Create a new Response Element for the Lookup
Use OnLookupOnCustomLookupType - For this example, three lines will be created and the value of the header field that the user input will be shown in the first line, as DisplayLine1
- Step 2.3 Create the steps for the Unplanned page
Use OnGetRegistrationConfiguration_OnAddSteps - For this example, only two steps will be created, a TextStep and a DecimalStep - You can read more about steps here.
- Step 2.4 Handle the posting of the Unplanned registration
Use OnPostAdhocRegistrationOnCustomRegistrationType - In this step, the data is collected and posted. This can be further inspected in the Mobile Document queue list. You can read more about this here.
How does it look on the device
Step 2.2: Lookup page - the ID entered by the user is shown as the first line.
Step 2.3: Unplanned page - Steps shown to collect text and integer values.
Step 2.4: Mobile Document Queue List - Inspecting the Request.xml and Response.xml for PostAdhocRegistration
See also
-
How-to: Create custom Unplanned function in Main Menu — The most common control for customization
Add a new function to the Main menu. "Header fields" and optional "Steps" to collect
-
How-to: Add ImageCapture Step for Adjust Quantity — Adds an extra ImageCapture Step to the Adjust Quantity functionality.
-
How-to: Add action to Order Line menu — Add a new Unplanned Function as action on Pick Lines.
-
Case: Default total RunTime based on produced quantity in Production Output — A customer wants the RunTime step for Production Output to be populated with a default value.
-
Case: Add custom step 'To-Location' to Unplanned Move — Add custom step for To-Location when posting Unplanned Move from/to locations without "Directed Putaway-and-pick"