Select to view content in your preferred language

Layer Definition string limitation

692
5
11-01-2013 07:40 AM
ESRIESRI1
New Contributor II
Using ESRI Sliverlight API 3.1 using layer definition in dynamic service layer, when I create a definition ID in ('1','2','3'......'1000001') . This definition is not getting applied, when I pass big string in REST unable to perform the query. But I need to set a filter based on ID, but I cannot number of ids. How to solve this?

                LayerDefinition def = new LayerDefinition();
                def.LayerID = layerId;
                def.Definition = "ID" + " in " + idString;
                dynamicServiceLayer.LayerDefinitions.Add(def);

idString = ID in ('1', '2','3'.....'1000001')
5 Replies
ESRIESRI1
New Contributor II
Any help on this?.
0 Kudos
DominiqueBroux
Esri Frequent Contributor
What is the size of your idString?
I tested with big string such as 1Mb without any issue.
Though I guess there is a limit, but, for performances, it's not recommended to use big layerDefinition because the layerDefinition is going through the network for every zoom or pan.
0 Kudos
AnjunFactor
New Contributor
I am performing a query (http://servername/ArcGIS/rest/services/Overlay_Map/MapServer/0/query) on a layer using the Where APN in ('1111111111', '1111111112', ...).  The query successfully returns data when the number of characters in the Where field is 13008 characters or less.  If I add another APN, the query gives an "Unable to perform query" error message.  Is this a standard limitation in the number of characters in the application?  Can this be increased?
0 Kudos
LanceCrumbliss
Occasional Contributor II
stab in the dark, but you could roll your own webclient request and use POST, putting the query in the body instead of using the querytask (which I think uses GET).  I could be mistaken but I think that is what the featurelayer layer type does when filtering existing features from the request on a refresh.
0 Kudos
AnjunFactor
New Contributor
Thanks for the response, chuckyboy81070.  FYI, I am already using POST when I run into this problem.  Using GET is even more limited.
0 Kudos