Select to view content in your preferred language

Definition Expression Problem

4059
5
Jump to solution
10-27-2014 06:34 AM
EvelynHernandez
Regular Contributor

Hello everybody.

Some months ago i developed a arcgis for flex app that shows features from a city , defining what city i want to show features with definition expression = "where city='alabama' " (for ex)

Some days ago, i cannot see any feature and i was trying to resolve the prob by myself, and i realized that if i put off the definition expression parameter where i define the map layers , the features are shown but not doing the filter that i want.

Is there any problem with the definition expression parameter? or is another thing that is making a prob?

Beforehand , thanks for ur answer.

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Evelyn,

   You should not have "WHERE" in your definitionExpression. It should just look like

<esri:FeatureLayer id="edicionLuminaria"

    url="http://gisred.chilquinta.cl:5555/arcgis/rest/services/AP_Municipal/AP_MUNICIPAL/FeatureServer/0"

    outFields="*" visible="true" definitionExpression="Comuna='LA CRUZ'"/>

View solution in original post

0 Kudos
5 Replies
RobertScheitlin__GISP
MVP Emeritus

Evelyn,

   Can you provide your code where you define the definition expression?

0 Kudos
EvelynHernandez
Regular Contributor

<esri:FeatureLayer id="edicionLuminaria"

    url="http://gisred.chilquinta.cl:5555/arcgis/rest/services/AP_Municipal/AP_MUNICIPAL/FeatureServer/0"

    outFields="*" visible="true" definitionExpression="WHERE Comuna='LA CRUZ'"/>

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Evelyn,

   You should not have "WHERE" in your definitionExpression. It should just look like

<esri:FeatureLayer id="edicionLuminaria"

    url="http://gisred.chilquinta.cl:5555/arcgis/rest/services/AP_Municipal/AP_MUNICIPAL/FeatureServer/0"

    outFields="*" visible="true" definitionExpression="Comuna='LA CRUZ'"/>

0 Kudos
EvelynHernandez
Regular Contributor

Thank you for ur answer, that was correct. But my question is : why before the definition expression let me do that and it showed the correct result and now i have to change it?  is it for any update?

Thanks again

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Evelyn,

   I am not aware of any change. I would not have thought that it ever would have worked with the keyword Where in the string.

0 Kudos