VERIFIED SOLUTION i
X

How to Create Parameter based tables in AnySite 9.x

UPDATED: February 12, 2015


Using Database Manger, create the Database via Tools>Database Manager..

Then, in the configurator, go to layers>Server and click "new" and give the server linked layer a name.  For this example: "uscty1k_STATE".
Select the Query radio button and then use SQL syntax to set up the query:
Select * from uscty1k where State={State$}

The Download dropdown should be set to "Using X/Y columns" so that Anysite will create the points using the coordinate fields in the Database.
Note: since the State field is character based, add $ after the field name:
User-added image

- Click on Type and specify the legend name.
- Set the Object Type to Points
- Check  the boxes for Editing, Searching On, Reporting On

User-added image


Click on "Address" and set the columns, where mapinfo_ID is a field with unique values (i.e. a "key"):

User-added image
Set desired "Styles", "Zoom", and "Label" and click OK thru the dialog and then add this new Server  layer to a map preference in the Anysite program.

After doing so, a query dialog will be displayed, asking the user to input the desired "State":
User-added image

Enter the desired State.  Example: CT
User-added image

ONLY the points where STATE = CT will be displayed.
 User-added image
To change the desired State, go to Map>Refresh>Parameters (or All) and the query dialog will re-display.

Note: queries can be created, such as, display only the records where TotPop is greater than 1,000,000:
Select * from USCTY_1k where TotPop>{TotPop}
User-added image
NOTE: To filter for multiple strings at once, the query for the Server layer would look like be similar to this example:
(The goal in this example is to show 4 layers based on the State field in the database "uscty153_access") 

Select * from uscty153_access where State in ('{State$1}', '{State$2}','{State$3}','{State$4}')

User-added image

Now when the map preference is opened, the dialog displays four fields where values for State can be entered.
(The dialog allows a user to query for 1 to 4 states)
User-added image







 

Environment Details



 

Downloads

  • No Downloads