I have an app that pulls in an AGOL feature layer which contains nearly 15000 features. I would like the app to do two things, the second I already have setup, it's the first that I can't figure out.
2. This could be causing issue one, but I'm not sure. Later in the JS I have another function that sets another definition expression on the same layer, which doesn't contain the original definition. This part works, but as stated, the first definition doesn't work. Is this actually overriding the first query?
For example, say I have 1000 features that are in the state of SC among a feature layer that contains all 50 states. Those same features in SC have an attribute for county. What I want to be able to do is, when the page loads using FeatureLayer Mode SNAPSHOT, ONLY pull into memory the state of SC, then later in the code set another expression to get only those in a particular county. Thus in the end, only return the features in SC in X county. This page always works in SC, thus I just wanna set that at the top, then do a more dynamic query later in the code for varying counties.
Is this possible?