How to get the Layer ID for the refresh layer activity in WAB?
I am trying to refresh a layer after adding a new feature using my workflow. I know I need to use the Get Layer and then Refresh Layer activity but I cant figure out how to get the layer id required for the Get Layer activity. I can manually enter in 1 for the layer id but the workflow fails to run. I am running my workflow in WAB not the HTML5 viewer.
-
Hello,
The Layer ID will correspond to the name of the layer within the web map as displayed in ArcGIS Online and may be named WebMap-2 or StClair_Sync - Assessed Structures for our training demo site.
Thanks, Stefan
0 -
Thanks Stefan- that did the trick. It would be great if the doco included syntax examples for both WAB and HTML5. I just assumed it was an index id not the layer name.?
0 -
No problem Belinda, we are planning on adding more info to the docs around this as well.
0 -
Stefan,
I have tried your suggestion but it tried this with wf (https://ekuipers.maps.arcgis.com/home/item.html?id=a9e43ac69ede4e39bd854a14f1ff3721) and with webmap https://ekuipers.maps.arcgis.com/home/item.html?id=60ee4ca060bc4e1fb5dc6555e40fc25b. And whatever I use for layerid no url or layer id is returned. What is going wrong? I use WAB Developer edition
Thnaks
0 -
Hello Erik,
I just ran your workflow using that web map and was able to obtain the URL. I change the Layer Id to simply: AssessedStructures . I also removed the middle Alert in your workflow since it was attempting to access the parseurl.url parameter before the Parse Url activity was run. I've attached the updated workflow.
Thanks, Stefan
0 -
Stefan,
Thanks, at first it didn't work but I used the old beta WF widget. When used the latest widget it worked as i thought it would. Thanks
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
6 Kommentare