Rapid modernization

Velocity includes a predictive engine to automatically recognize screen elements and redesign them to present a modern interface. Rapid modernization allows you to modify the way the predictive engine displays content, without changing each screen or template individually.

Some rapid modernization scripts have been customized for specific warehouse management systems. To use these preconfigured scripts, download a project from:

https://rapidmodern.ivanti.com

Use rapid modernization to redesign the entire experience, or just use it for specific pieces of the application.

To use rapid modernization, include a script in your Velocity project that recognizes specific pages or page elements sent from the host and provides information about how to display them.

Rapid modernization is not designed to be used in a project where you have modified the screens and created screen templates. If you have modified screens on the Screens tab, those changes override a rapid modernization script and the script will not be processed for those pages.

Rapid modernization example

The following example script handles a menu that uses nested numbering for menu items. We've added line numbers to the left to make it easier to discuss.

1 ModernScreen.disablePredictive("Menu");

2 WLEvent.on("ParseScreen", function(eventObject) {

3 if (eventObject.containsTextAt(matchRow, matchColumn, matchValue)) {

4 var re = [ /\d\d?\.\d\d?\.(\d\d?)\s\-\s\*?(\w+(\s+\w+)*)/, /\d\d?\.(\d\d?)\s\-\s\*?(\w+(\s\w+)*)/, /(\d\d?)\s\-\s\*?(\w+(\s\w+)*)/ ];

 

6 for (var i = 0; i < 25; i ++) {

7 var currentLine = eventObject.getTextAt(i, 0);

8 for (var n = 0; n < 3; n ++) {

9 var result = re[n].exec(currentLine);

10 if (result) {

11 var value = result[1];

12 var label = result[2];

 

14 var menuItem = eventObject.createMenuItem(i, 0, label, value + "{enter}");

15 eventObject.add(menuItem);

16 eventObject.markScreen(i, result.index, result[0].length);

17 break;

18 }

19 }

20 }

21 }

22 });

Download the example script

This script is tied to the session, so it runs on every screen.

Line 1: Disable the predictive engine from trying to interpret menus. This step is important if the predictive engine is misinterpreting other screen items as menu items.

Line 2: The rest of the script is triggered each time Velocity parses a new screen.

Line 3-4: Process each screen that has text matching the regular expressions.

Lines 6-7: Get the text for each row.

Lines 8-9: Check each row against the regular expressions.

Lines 10-12: If the row matches the regular expressions, capture the results and labels them as the variables value and label.

Line 14: Create a menu item on the same row, with the same label and value, and append an Enter to the value so that it sends the value to the host.

Line 15: Add the menu item to the screen.

Line 16: Specify any area that was processed by the script as already processed, so that the predictive engine doesn't process it again.