Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm building a web application in ArcGIS Server for .net and I want to create query task for each layer so that each query depends on the previous result query task, how can I do that... please help me???

Thanks

share|improve this question

2 Answers 2

Since you're using ASP.NET, I assume you're using the ADF. We use MVC and the JavaScript API, but we create a class on the server to manage each query type (vehicles, garages, etc.).

You could create a page method to set up each query and pass it the results of the previous query. When the user makes a selection, call the page method with the selected value. In the page method, code the query and return the results to the second drop down.

Is that the kind of process you're looking for? Or do you need the actual code?

share|improve this answer

If I understand what you mean,you need to select features drom previous selection,for example if the first query select 1000 features in layer1,you need the second query in this layer,selects from that 1000 features.If this is right,maybe this is a solution for it:

1.Creating a table containing this columns at least: UserName|SessionId,LayerId,FeatureId,TimeStamp,(For example TBSel table)

2.Create an extension,overload tha SelectionChanged event of IActivatedView,and in the callback method,if there is new selections in that layer,(Can delete previous records corresponding to layerId and UserName and) insert new records for new selections in that layer(or all layers) TimeStamp column must be filled with the system time.

3.Combine each query for that layer with this phrase:

WhereClause+=" AND FeatureId in (SELECT FeatureId FROM TBSel WHERE UserName='MyUser' AND LayerId='MyLayerId' AND TimeStamp=(SELECT Max(TimeStamp) FROM TBSel WHERE UserName='MyUser' AND LayerId='MyLayerId' ))

in this way,selection from that layer is from most previous selection(or result of previous query),even you can make this optional,and if user want to enable this option,you will change WhereClause of the query filter.

Hope I could understand what you mean and it helps.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.