Possible Values Search
Possible Values Search operation allows you to create any operation with or without search parameters to
find a particular possible value to use for a field. WOW opens the Possible Values Search operation in a
separate pop-up window, runs it after you have specified parameters and then the user selects the correct
value. For example you may have a possible values operation that returns two thousand options for the user
to select; this can cause problems because of the extremely large size of the drop-down. In this case you
would want the user to be able to search or query down to a more manageable list of options and then select
the correct value.
Steps to Utilize Possible Values Search Operation
Create Possible Values Search Operation
Create new operation and set the operation type to Possible Values Search. In operation code create a
standard SQL select statement; just make sure you specify the Possible Value field first. Note: Job is the
first field in the select because you will set this PV Search operation to the Job field. The first field returned
should always be the field with a value that you want to use as the Possible Value. After specifying the
other fields plus any search conditions that you want to present the user, then click the create operation
button.
Set Possible Search Operation to desired field's field descriptor
Run an operation that includes the field that you would like to set the PV Search operation and open that
fields Field Descriptor. If no Field Descriptor exists then create Field Descriptors for the entire table. In this
case we set the PV Search operation to the Job field in a sample employee table as shown below.
Update or Insert with new Possible Value Search
[EE] When you edit (Update or Insert) a record with the Job field WOW will generate a retrieve button next
to the field. This will retrieve the user's desired possible value by running the Possible Value Search operation in
a new pop-up window.
Retrieve Possible Values
The new pop-up window will run the Possible Values operation in this case searching last name. After entering
in a search parameter value, WOW will bring back a result set with all possible values.
Populate Field with valid Possible Value (PV)
The returned results have a populate button that when clicked will grab the first field's (column) value and set
as the current field's PV. In this example the first field is Job and the first populate button is clicked fills the
'MANAGER' value into the field as seen below.
Now that the value has been filled in proceed as normal with your update, insert or search. There is no limit to the
# of fields that can have Possible Value Search in a particular operation.
Using Possible Values Search to Populate Other Fields
Possible Values (PV) Search can be configured to populate other values/fields (similar to Possible Values Selector). The PossibleValues property group is used for this function and must be placed in the main (not the PV search) operation's properties. In this example, the PV Search operation should have in it’s results the first 3 fields equal to (same field names, same order, similar data types)) the copyList fields(BasePath, BranchType, BranchName):
PossibleValues { fieldName:BasePath; copyList:BasePath,BranchType,BranchName; }
fieldName - This property identifies which field in the main operation this configuration belongs to. It is needed in case your operation has more than 1 PV Search.
copyList - A list of fields to copy.
copyRule - fieldNames, usageId. Defaults to fieldNames. Tells how field values from the possible value row should be filled into/mapped to the actual row once a possible value is selected.
NOTE: If using field names (default) for copyRule, make sure the field names match between the PV Search operation and the main operation. Also, the copyList field names must be listed in the same order as they are listed in the PV Search operation's SQL.
NOTE: If the copyList Fields do not match with fields in the main operation, a JS error will occur and the Populate button will not function correctly.