How to use Set Layer Definition Expression Activity?
I have an ArcGIS portal map in WAB that has a map layer with sublayers (see image attached). Not having any luck getting the expression set for the layers. I can return the layer's properties by using the layer name ("PPM") in the Get Layer activity, but when i use the sublayer name ("Unapproved Segment" for example) in the Set Layer Definition Expression activity, it does not set the layer's definition and still returns undefined for that property of the layer.
-
Try using the numerical layer ID instead of the layer name. https://docs.geocortex.com/workflow/latest/help/Default.htm#wf5/help/activities/set-layer-definition-expression.htm mentions that WAB can use the name instead of ID on the "Layer ID" property, but there's no mention of this on the "Sublayer ID" property.
If that works but it's necessary to be using the name instead of the id, we could probably find a method to get the ID for a given sublayer name, and pass it along to Set Layer Definition Expression- maybe from from the output of a Get Layer activity.
0 -
Amanda,
Thank you for your response. Allow me to give you some more details. I tried using "0" as an input for the Get Layer and Set Layer Definition Expression activities, and both of them return undefined when I do so. I have also tried using the id ("id: DistrictBoundaries_DOT_NE_3084") property for the layer. Tried to just put in 3084 also. I have attached an image of the layer properties for your review. Is there a map layer numerical id property I am missing? Thanks, Chris

0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
2 Kommentare