Select to view content in your preferred language

Query data and display without the user having to create the query

764
3
10-11-2013 03:51 PM
GerryGabrisch
Frequent Contributor
I have a feature class of sample sites and I would like to generate a map for each sample site. 

For example, the user would click a hotlink for a map showing sample site 1, a map would open, site 1 would be queried and only site 1 displayed on the map.  The user would not have to generate the query.

Is this possible?
Any help would be appreciated.
0 Kudos
3 Replies
BrianLeroux
Frequent Contributor
Yes that is possible using a behavior. I have done something similar but with a regular tool that a user needs to click to run. You can have your link set with a parameter. http://yourserver/map/?SITE=site1
The code below  will pull the parameter out to a string. Then you can pass this string into your query as needed. Hope this helps.

string querySite;
public void getParameters()
        {
            Dictionary<string, string> urlparams = HtmlPage.Document.QueryString as Dictionary<string, string>;
            urlparams.TryGetValue("SITE", out querySite);
            
        }
0 Kudos
GerryGabrisch
Frequent Contributor
Brian,
Thanks for the information.  Can you point me in the direction of some online help on the subject?
0 Kudos
PietaSwanepoel2
Frequent Contributor
Gerry, that is something you will have to program yourself.

Another alternative could be to configure the different sites in application builder and then have a html page with hyperlinks to the various sites. Might be the easiest in your case.
0 Kudos