Virtual Fields

Virtual Fields

Virtual Fields is a utility for adding fields (vFields) to GP windows without needing to using Modifier. The vFields are added in a way that does not affect existing security on GP windows.

Virtual Fields works together with the Virtual Triggers module to add fields to a window and be able to add “change scripts” to fields, and to get, save and delete the data entered in to the vFields.

Virtual Fields can be added to any window in a dexterity-based module (core GP windows or 3rd Party Products). In most cases, on all windows (core and 3rd party) the vFields can display information from the primary table linked to the window (this does not require Virtual Triggers as GP will normally populate all fields on the window that come from the primary table). However, the get/save/delete functionality only works on core GP windows.

For example, a vField could add a Go To Button to Customer Maintenance and then Virtual Triggers could add code to each go-to option.

Since Virtual Fields are in dexterity, they are compatible with the GP Web Client.

Virtual Fields is a dexterity development tool and is not intended for end-users. Correctly referencing vFields and creating Scriptlets requires advanced level experience with Dexterity (sanScript).

Contact WilloWare Support for the programming services to create Virtual Fields.

 

Setup

HelpID: 460022045

Navigation: Tools >> Utilities >> System >> Virtual Fields Setup

WilloWare will send vFields in a csv file which can be imported into the Virtual Fields Setup window. The scriptlets will be as text files which can be imported into the Virtual Triggers Setup window.

IMPORT: Click the Import button, then select a CSV file. Click OPEN.

NOTE: If there are Scriptlets included with the vFields CSV file, import the Scriptlets (Virtual Triggers) before importing the vFields file.

The vFields setup will be read from the file, saved to the database, then displayed in the VF Setup window. If the VirtualFieldID already exists, you will be asked to confirm that you want to overwrite the existing vFieldID.

DATABASE: the vFields file does NOT contain Database selections. The vFields will only display in the database(s) selected in the Databases window..

Click the DATABASES button.

Mark the database(s) in which you want the vFields to display. Click the Mark All or Unmark All buttons to select/de-select all databases.

Click the DATABASES button to hide the window.

ACTIVE: by default the vFieldID will be marked as ACTIVE. Unmark this box to disable it.

SAVE: click SAVE to save the vFieldID and clear the window.

The vFields are now active for the current user. Other users will need to close GP, then log-in again to activate the vFields in their GP client.

Windows

vFields can be added to any core GP window. Scrolling windows are supported, however vFields can only be added to the area exposed when the scrolling window is in in Expanded mode. For example, in the Sales Transaction Entry scrolling window, it is the area indicated by the green box.

The position of the vField is entered in VF Setup. If the Horizontal or Vertical position is outside the boundaries of the standard window, in most cases the window will automatically grow to include the field. In the screen shots below, a Go To button was added to Customer Maintenance, and instead of using the available space beside the Write Letters button, it was added just off the bounds of the window, causing it to become wider.

NOTE: Most, but not all windows can “grow” like this.

Fields

The maximum number of total data fields allowable is ten, while the maximum number of buttons is five.

FIELD TYPE: The following virtual field datatypes are supported. The generic Field IDs are listed.

  • String
  • Integer/ Long Integer
  • Currency
  • Date
  • Checkbox
  • Dropdown List
  • Push Button
  • Button Drop List

PRODUCT ID: Fields from any product ID can be added to a window. Generic vFields are in the CTK by WilloWare product.

FIELD ID: In most cases, a generic vField from CTK will be used, but in some instances, adding an existing field from another product is the best option. One advantage of using an existing field is that it exposes the Auto Complete feature:

Another benefit to using an existing field is the ability to use a lookup window to select the value.

When using an existing Dropdown field, the values will be used in the field. Custom Dropdown and Button Drop Lists will have their values set in the Field Values window.

FIELD PROMPT: Enter the string value to use as the label that sits next to the field on the window.

POSITION LEFT/ TOP: Location in pixels of the botton left corner of the vField on the window.

Size Horizontal/ Vertical: The size of the field on the window.

Label Size: The length of the label on the window.

EDITABLE: Select if the vField is editable. Deselect if it is view only.

TOOLBAR: (only displayed if the field type is PUSH or DROP BUTTON. Selecting this will default the top position and vertical size to be optimized for the toolbar.

INCLUDE LOOKUP: Automatically displays a lookup button next to the field and creates a Virtual Trigger than can be edited to provide lookup functionality.

TRIGGER ID: Displays the Trigger ID for the vField. All vFields have a default trigger auto generated. The default field trigger is used to add “change” functionality that runs when data is entered into the vField.

Go To Button: The options in Go to Button should only be used when setting up a new vFieldID, or when adding new vFields.

  • Create View: A SQL view is created so that the new vFields can used in SmartLists, or any reporting product that can use SQL views. The view will be called “wv”+Virtual Fields Group ID. In the example above, the SQL view is wvRMCustomerMaintenance. In addition to the Key fields from the header, each non-button field will have a column in the view.
    • The headers will be the Key Fields and Field Prompts, with spaces removed.
    • Dropdowns will have their String value of the selection, not it numeric position.

  • Create Window Triggers: Used the build (or rebuild) the virtual triggers to display the vFields. Clicking this will overwrite the existing triggers.
  • Create Field Triggers: Used the build (or rebuild) the virtual triggers associated with the vFields. Clicking this will overwrite the existing triggers.
  • Create Get-Save-Delete Template Triggers: Used the build (or rebuild) the virtual triggers to display, save or delete the values in the vFields. Clicking this will overwrite the existing triggers.