View Full Form
XSPOC Client Help

Creating Groups

The groupings of wells listed in the tree-view window are customer configurable

CONTENTS

The groupings of wells listed in the tree-view window are customer configurable. Any database query that returns a list of well names can be used in XSPOC to create these groups, meaning any value in the database can be used as conditions for well groupings. The customer can also create hierarchies of well groups. A basic understanding of how to create a database query using a tool like Microsoft Access is recommended to perform this task.

The easiest way to perform this task is to use a tool like Microsoft Access to modify the entries in the table tblWellGroups. The columns in this table which need to be populated for this task are:

GroupName
This is the name of the group as it will appear in the tree view. This name must be unique and is limited to 10 characters.
ParentGroupName
This is the name of the group that you want the new group to be under, or the group's parent. This is how the levels of the hierarchy can be built. A ParentGroupName of 'root' will cause the group to be created at the top or highest level of the tree structure.
SQLText
This column contains the text of the query that will be used to generate the well list. It is assumed that the person building these groups has at least some knowledge of SQL. The 'select' part of the query is required to have two columns: 'NodeID' and 'DRC'. Other than this there are really no limits on what the query contains as long as it is a valid SQL query. It is often easiest to find an existing group with the table and copy and paste it and then modify it rather than creating this SQLText from scratch. The key to this SQL will of course be the 'where' part of the clause where the filter conditions are actually specified.

Example

GroupName SQLText ParentGroupName
TestGroup NULL root
TestField SELECT tblNodeMaster.NodeID, tblWellDetails.DownReasonCode FROM tblNodeMaster LEFT JOIN tblWellDetails ON tblNodeMaster.NodeID = tblWellDetails.NodeID ORDER BY tblNodeMaster.NodeID;