-
Notifications
You must be signed in to change notification settings - Fork 9
GPVSearch
Andrew Buck edited this page Oct 2, 2015
·
30 revisions
Each layer in the GPV can have one or more search forms associated with it. These searches appear in the top dropdown list on the Search function tab. When a search is selected the user is given a form with input fields for specifying the search criteria.
- SearchID - The unique identifier for this search (not null).
- LayerID - The ID of the GPV layer this search is connected to (not null). Links to GPVLayer.
- DisplayName - The name of this search on the interface (not null).
- ConnectionID - The database connection for the stored procedure. If null, defaults to the configuration database. Links to GPVConnection.
- StoredProc - The name of the stored procedure which provides the text of the SQL SELECT statement for this search (not null). The GPV inserts a WHERE clause into this statement when performing the search.
- SequenceNo - A number specifying the display order of this search (not null).
- Active - Specifies whether this search should be available for use, 1 for yes and 0 for no. If null, defaults to 0 (no).
Here is an example of entries in the Search configuration table and an example of a search stored procedure. These are for the host.appgeo.com/encmaster web site.
Search Table
SearchID | LayerID | DisplayName | ConnectionID | StoredProc | SequenceNo | Active |
---|---|---|---|---|---|---|
Assessment_areas | AssessmentArea | Assessment Area | NULL | GPVSearch_AssessmentAreas | 2 | 1 |
Bartlett_inventory | Bartlett_inventory | 2013 Tree Inventory | NULL | GPVSearch_Bartlett_inventory | 1 | 1 |
Search Input Field Table
FieldID | SearchID | DisplayName | ColumnName | FieldType | ConnectionID | StoredProc | SequenceNo | Active |
---|---|---|---|---|---|---|---|---|
Assessment_Areas | Assessment_areas | Assessment Area ID | a.AAID | list | NULL | GPVSearch_AssessmentAreas_AAID | 1 | 1 |
Condition Bartlett_inventory | Condition | Condition_ | list | NULL | GPVSearch_Bartlett_Inventory_Condition | 4 | 1 | |
DBH_1 | Bartlett_inventory | DBH Range | DBH_1 | numberrange | NULL | NULL | 3 | 1 |
ParkName | Bartlett_inventory | Park Name | p.ParkName | list | NULL | GPVSearch_Bartlett_Inventory_ParkName | 5 | 1 |
Priority | Bartlett_inventory | Care Priority 1-12 | Tree_Care_ | numberrange | NULL | NULL | 6 | 1 |
Species | Bartlett_inventory | Species | Common_Nam | autocomplete | NULL | GPVSearch_Bartlett_Inventory_Species | 2 | 1 |
Treeid | Bartlett_inventory | Tree ID | t.TreeId | number | NULL | NULL | 1 | 1 |
Search Input Field Stored Procedure
ALTER procedure [dbo].[GPVSearch_Bartlett_Inventory_Species]
@intext nvarchar(50)
as
select distinct Common_Nam
from Bartlett_inventory
Where Common_Nam like @intext + '%'
order by Common_Nam