definition expression

6264
9
Jump to solution
05-27-2015 06:50 AM
LefterisKoumis
Regular Contributor

Hello. I am newbie in the web app builder area. How can I apply a definition expression on a layer to draw only the features that meets the criteria. I looked into the layerInfos in the json file but I am not sure iof you can you use a definition expression. Thanks.

0 Kudos
1 Solution

Accepted Solutions
DanielStoelb
Occasional Contributor III

Lefteris,

You might want to check out the following: LocalLayerWidget and AccessifizrWidget Additionally, there is the possibility of modifying the code to do definition expressions.  Check out this thread for details: Local Layer Widget .

View solution in original post

9 Replies
RickeyFight
MVP Regular Contributor

Lefteris,

This thread shows how this can be done.

Custom Floor switcher widget WAB

LefterisKoumis
Regular Contributor

Thank you. I see how is done in the code. I was hoping to see a configuration file (perhaps json file)that you can define the layers that you use in the map and the definition expression to define which datasets to display. I am trying to migrate to JS from FLEX where you can do this in the configuration file.

Suggestions?

RickeyFight
MVP Regular Contributor

Lefteris,

I was working on this to make it a widget but I have been distracted for a few weeks.

Maybe Robert Scheitlin, GISP​ can help you.

Also look at some examples here: Web AppBuilder Developer Edition – Customization Resource List

ZhifangWang
Esri Regular Contributor

Hi Lefteris,

Have you tried the Query Widget? I think you can filter a layer in Query Widget UI and also in the configuration json file.

Query widget—Web AppBuilder for ArcGIS | ArcGIS

Query—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developers

DanielStoelb
Occasional Contributor III

Lefteris,

You might want to check out the following: LocalLayerWidget and AccessifizrWidget Additionally, there is the possibility of modifying the code to do definition expressions.  Check out this thread for details: Local Layer Widget .

View solution in original post

LefterisKoumis
Regular Contributor

Thank you. Robert's response to your question provided the info I was looking for.

0 Kudos
JeremieCornet1
Occasional Contributor II

You can filter your layers in the AGOL (or PORTAL) map used in your app.

0 Kudos
StanMcShinsky
Regular Contributor

This would be better for me too.

-Stan

0 Kudos
LefterisKoumis
Regular Contributor

Yes, That's correct. However, in my case where I have multiple layers is a lot easier to modify the definition expression in a configuration file rather than creating a map for each case.

Thank you.

0 Kudos