Aller au contenu principal

How to populate Get Value Coded Domain activity using the "Layer" input?

Commentaires

4 commentaires

  • Gareth Finney

    Hi Chris, I'll chime in here and give my thoughts on this. 

    I've found the Get Layer activity a bit quirky in all honesty, but this one is working for me. The key here was to add the webmap service (or folder?) name to the mix (if it exists). In my case I have a webmap composed of layers and the result in the VSweb layerlist presents as below. Incidents is the ‘parent’ item. In my case, the service name, but I assume this could be a user defined folder name also (?). The sublayer id (16) in my case, is the layer id on the actual ArcGIS rest service the webmap is referencing.

    Hope that makes sense?

     

    0
  • Chris Dunlop

    Thanks Gareth.  That's exactly what I'd tried.  I know that the layer is created property, because if I run a query activity on it (using $layer1.sublayer) it finds the records.  

    The weird thing is, while it fails 90% of the time, it occasionally does work.  I haven't been able to figure out what causes it to work - going to open a support case on it.  

    Chris

    0
  • Gareth Finney

    Yeah - strange that it works some times but not others. I went down the url approach in the end, but that ties you to static layer ids which is not all that accommodating of change

    Interested in hearing what support have to say on this one.

    0
  • Chris Dunlop

    Amanda Frech was able to explain what's going on.  Turns out the when you create a layer, the sublayer field information isn't populated until an identify operation has been performed.  So to use the Layer input ($layer1.sublayer), to get around this problem, at the start of the workflow I use a Get Map activity and a Create Point activity to create a point at 0,0 (nowhere near my actual data).  Then I use a Run Operation activity with an Operation Name of tasks.identify and an Operation Parameter of {"geometry": $point1.point,"layersInScaleRangeOnly":false,"visibleLayersOnly":false,"maps":$map1.map.extension} 

    Doing this populates the sublayer field properties, and the Get Coded Value Domain activity works.

    It's logged as bug tracker 341892, so may be fixed at some point in a future release.

    Chris

     

    0

Vous devez vous connecter pour laisser un commentaire.