Define Values to be Retrieved from the Database (Web Service Prompt > Retrieved Values tab) - HxGN EAM - 11.07.01 - Feature Briefs - Hexagon

HxGN EAM Web Service Prompts

Language
English
Product
HxGN EAM
Search by Category
Feature Briefs
HxGN EAM Version
11.7.1

Values can be retrieved from the database and automatically populated into a Destination field when the user enters data into a Source field and tabs out. Retrieving values saves data entry time and prevents potential key stroke mistakes for data that it is not necessary for the user to manually enter because it can be retrieved from the database.

For example, let’s say an employee regularly creates work orders and activities that they themselves work on. Using retrieved values can make the work order creation process much faster and more precise than manually entering all the required information. If a prompt is created to insert a work order and activity, the administrator can specify that the system should retrieve the user’s trade automatically once work order Created By field is entered. Once the user code is entered for Created By, the system can find the related employee code and retrieve the employee’s trade for use when creating the work order activity. In this way, the trade can be automatically populated for the activity and the user will still have the option to change this value if the field is not protected or hidden. The Query Code field is used to identify a Select statement which will retrieve a value and populate the Destination field.

Organization fields (class organization, equipment organization, etc.) and record descriptions (equipment description, manufacturer descriptions, etc.) are also excellent opportunities to use retrieved values because once the record code is entered the system will retrieve and display the organization or description automatically.

To set this functionality up properly, enter the Sequence corresponding to the field for which you would like to trigger (when tabbing out of the Source field) the value to be retrieved and populated into the field identified by the Sequence in the Destination field. In the image displayed on page 24, the administrator wants to ensure that the Store Org. is retrieved and displayed automatically when the user enters the Store code and tabs out. The Select statement used to retrieve the Store Org. can be seen in the SQL Statement field and is related to the STORE Query Code. Pay attention to the use of a variable in the WHERE clause. The variable is used to grab the Store Org value from Sequence 404 and pass it into the Select statement (variable value are discussed in more detail in the Computed Data section).

Setting this up requires identifying the Source (Created By: Sequence 404), the Destination (Store Org.: Sequence 405), and the SQL Statement used to query the trade of the employee that is related to the supplied user name. These SQL Statements can be defined on the Queries screen. Use of a Query Code here is completely different than using it on the Fields tab to define a validated lookup.

This functionality is intended for users who will be operating in a ‘connected’ environment that is, Datastream 7i Extended or Datastream 7i Mobile users in a ‘connected’ environment. Since values are retrieved from the server, if a Mobile device is used to process the prompt, you must be in a connected state to have values retrieved using the Query Code statement. If you plan to use the prompt where a connection may not always exist, fill in the Mobile Query Code field. The Mobile Query Code field looks up to Queries as well; however, you should write these queries based on the local Mobile tables. Remember, in a disconnected state the Mobile device must be able to run this query against the mobile tables.

Query Code and Mobile Query Code can both be populated. When the prompt is executed if a connection exists the device will use the Query Code field; else, the Mobile Query Code will be used. Mobile Query Code will have no impact on behavior when the prompt is executed within Extended.

  • When the Query Code or the Mobile Query Code Select statement does not retrieve a single value the system will not populate a value in the Destination field, but will instead display a lookup with the Destination field. When the user tabs into the Destination field they may click the lookup to select from the retrieved values.

  • A retrieved value record must have a Query Code, a Mobile Query Code, or both values filled in.

  • The Destination field sequence number must be greater than the Source field sequence number that is, retrieved fields must populate a field (Destination) further down into the prompt than the triggering field (Source).