Zum Hauptinhalt gehen

GeometryPicker Value in Studio Web

Kommentare

10 Kommentare

  • Nico Burgerhart

    E.g.

    =$form1.state.geometryPicker1.value.geometry[0]

    You can use a Cast Geometry activity to cast it to a polygon, and use the following to show the number of rings in an Alert.

    =$castGeometry1.polygon.rings.length.toString()
    1
  • Sean McClurkan

    Thanks, Nico. That creates a polygon that the workflow still can't use as the geometry of a Create Feature activity.

    I'm trying to draw a polygon with the geometry picker and use that geometry to create a feature to append to a FeatureService layer.

    The end result of all these efforts still creates a wiggedy-looking animal that doesn't look like a "normal" geometry.

     

    0
  • Nick Rappa

    Hi Sean, 

    I've also run into this change for web and used the "results.from-graphics" operation via run operation activity in VTS workflow to convert to Esri feature for an append - see below.

    Hope this is useful in your installation.

    Commands, Operations and Events Reference | VertiGIS Studio Developer Center

    Run Operation activity:

    In:

    Out:

    Cheers,

    Nick

    1
  • Nico Burgerhart

    In this VertiGIS Studio Workflow - Add Feature sample workflow https://www.arcgis.com/home/item.html?id=7256ddcc8a82465f950068e1276e7104 in a Create Feature activiity the Geometry is assigned as

    =$addForm.state.location.value.geometry[0]

    1
  • Sean McClurkan

    Thanks again, Nico.

    That's the way I was creating the feature originally.  This notation does create a "feature", but the feature doesn't behave like an ordinary feature queried from a map service.

    Features I query from a map service draw in the map and have geometries I can easily extract and use.

    "Features" created with geometry from a geometry picker do not.

    I'll pester VertiGIS directly from here.

    0
  • Gareth Finney

    Hi Sean,

    I've got a workflow that pretty much does as you're asking. Get user input, and add it to a feature layer via the Add Feature activity. It's pretty raw, and yet to be finalised, but it works in a development sense for now. I've attached the json below. 

    I wish there was a way of attaching files to this thing!

    {"_properties":{"isServerWorkflow":false},"components":[{"id":2,"steps":[{"id":3,"inputs":{},"position":"-230,-130","purpose":"start","title":"Start","transitions":[{"id":216,"inputs":{},"position":"-140,-70 -140,-10","sourceConnector":"bottom","target":{"id":238}}]},{"action":"gcx:wf:ui::Alert","id":186,"inputs":{"text":{"accessors":["$value1"],"annotations":[{"count":7,"index":0,"kind":"idref"}],"code":"$value1.result","source":"$value1.result"}},"position":"-620,230","title":"Alert"},{"action":"gcx:wf:core::CreateValue","id":207,"inputs":{"expression":{"accessors":["parseInt","$valueUtcOffset1"],"annotations":[{"count":8,"index":0,"kind":"idref"},{"count":16,"index":9,"kind":"idref"}],"code":"parseInt($valueUtcOffset1)","source":"parseInt($valueUtcOffset1)"}},"name":"value1","position":"-620,110","title":"Create Value","transitions":[{"id":215,"inputs":{},"position":"-500,180 -500,230","sourceConnector":"bottom","target":{"id":186}}]},{"action":"gcx:wf:core::Container","id":236,"inputs":{},"position":"-20,-150","title":"Set Up"},{"action":"gcx:wf:forms:form:DisplayForm","description":"Get user to add inputs, and draw the shape","id":238,"inputs":{"form":{"accessors":[],"code":"resources.forms[values.id]","values":{"id":234}}},"name":"mainObsForm","position":"-260,-10","title":"Main Obs Input Form","transitions":[{"id":312,"inputs":{},"position":"-140,160 -140,300","sourceConnector":"bottom","target":{"id":240}}]},{"action":"gcx:wf:core::If","description":"If user selects add - proceed with workflow","id":240,"inputs":{"condition":{"accessors":["$mainObsForm"],"annotations":[{"count":12,"index":0,"kind":"idref"}],"code":"$mainObsForm.result == \"add\"","source":"$mainObsForm.result == \"add\""}},"position":"-260,300","title":"If add","transitions":[{"branch":"true","id":256,"inputs":{},"position":"-260,355 -460,355 -460,400","sourceConnector":"left","target":{"id":242},"targetConnector":"top"},{"branch":"false","id":415,"inputs":{},"position":"-20,355 210,355 210,460","sourceConnector":"right","target":{"id":413},"targetConnector":"top"}]},{"action":"gcx:wf:core::Container","description":"Add the new feature to the feature service backend. Updating attributes also","id":242,"inputs":{},"name":"ContainerCreateAndAddFeature","position":"-580,400","title":"Add Feature","transitions":[{"id":149,"inputs":{},"position":"-460,590 -460,610 210,610 210,520","sourceConnector":"bottom","target":{"id":413},"targetConnector":"bottom"}]},{"action":"gcx:wf:ui::Alert","id":376,"inputs":{"text":{"accessors":["$valueUtcOffset"],"annotations":[{"count":15,"index":0,"kind":"idref"}],"code":"$valueUtcOffset.result.toString()","source":"$valueUtcOffset.result.toString()"}},"position":"-620,-230","title":"Alert"},{"action":"gcx:wf:core::Log","id":380,"inputs":{"message":{"accessors":["$valueUtcOffset"],"annotations":[{"count":15,"index":0,"kind":"idref"}],"code":"$valueUtcOffset.result","source":"$valueUtcOffset.result"}},"position":"-280,-230","title":"Log"},{"action":"gcx:wf:core::CreateValue","description":"get UTC offset to add to obs dates","id":400,"inputs":{"expression":{"accessors":["Date"],"annotations":[{"count":4,"index":4,"kind":"idref"}],"code":"new Date().getTimezoneOffset() * 60","source":"new Date().getTimezoneOffset() * 60"}},"name":"valueUtcOffset1","position":"-620,-160","title":"Create Value","transitions":[{"id":188,"inputs":{},"position":"-500,-40 -500,0","sourceConnector":"bottom","target":{"id":402}}]},{"action":"gcx:wf:core::CreateValue","id":402,"inputs":{"expression":{"accessors":["Date"],"annotations":[{"count":4,"index":4,"kind":"idref"}],"code":"new Date().getTime()","source":"new Date().getTime()"}},"name":"valueCurrTime","position":"-620,0","title":"Create Value","transitions":[{"id":209,"inputs":{},"position":"-500,70 -500,110","sourceConnector":"bottom","target":{"id":207}}]},{"action":"gcx:wf:core::Exit","id":413,"inputs":{},"position":"120,460","title":"Exit"},{"action":"gcx:wf:forms:form:DisplayForm","id":444,"inputs":{"form":{"accessors":[],"code":"resources.forms[values.id]","values":{"id":442}}},"name":"firstAddObsForm","position":"350,-110","title":"Select Main Obs Type"}]},{"id":140,"steps":[{"id":142,"inputs":{},"position":"0,-20","purpose":"start","title":"Container Add Feature Sequence","transitions":[{"id":292,"inputs":{},"position":"90,40 90,130","sourceConnector":"bottom","target":{"id":275}}]},{"action":"gcx:wf:arcgis::AddFeatures","id":228,"inputs":{"features":{"accessors":["$feature"],"annotations":[{"count":8,"index":0,"kind":"idref"}],"code":"$feature.feature","source":"$feature.feature"},"url":"https://dev.ffm.vic.gov.au/arcgis/rest/services/feature_edit/FeatureServer/2"},"name":"addFeature","position":"270,350","title":"Add Feature","transitions":[{"id":232,"inputs":{},"position":"390,420 390,545 -40,545","sourceConnector":"bottom","target":{"id":230}}]},{"action":"gcx:wf:arcgis::RefreshLayer","id":230,"inputs":{"layer":"Observations - Area (Editing)"},"position":"-280,530","title":"Refresh Layer"},{"action":"gcx:wf:core::Container","description":"Assign attributes to feature","id":275,"inputs":{},"name":"ContainerSetAttributes","position":"-30,130","title":"Set Attributes","transitions":[{"id":302,"inputs":{},"position":"210,205 250,205 250,385 270,385","sourceConnector":"right","target":{"id":228}}]},{"action":"gcx:wf:core::Container","description":"Add feature to map","id":345,"inputs":{},"name":"ContainerAddFeature","position":"-480,220","title":"Add Feature"}]},{"id":148,"steps":[{"action":"gcx:wf:forms::SetFormElementItems","description":"Assign form element items to the element.","id":151,"inputs":{"form":{"accessors":["$$form"],"annotations":[{"count":6,"index":0,"kind":"idref"}],"code":"$$form","source":"$$form"},"items":{"accessors":["$formElementItems1"],"annotations":[{"count":18,"index":0,"kind":"idref"}],"code":"$formElementItems1.items","source":"$formElementItems1.items"}},"position":"-20,820","title":"Set Form Element Items"},{"id":156,"inputs":{},"position":"0,0","purpose":"start","title":"Event","transitions":[{"id":169,"inputs":{},"position":"90,60 90,110","target":{"id":161}}]},{"action":"gcx:wf:forms::GetFormEventData","description":"Get the current value from the AutoComplete element.","id":161,"inputs":{"form":{"accessors":["$$form"],"annotations":[{"count":6,"index":0,"kind":"idref"}],"code":"$$form","source":"$$form"}},"name":"getFormEventData1","position":"-30,110","title":"Get Form Event Data","transitions":[{"id":173,"inputs":{},"position":"90,230 90,270","target":{"id":163}}]},{"action":"gcx:wf:core::TextReplace","description":"Escape apostrophe characters to avoid SQL injection and broken queries.","id":163,"inputs":{"newValue":"''","oldValue":"'","text":{"accessors":["$getFormEventData1"],"annotations":[{"count":18,"index":0,"kind":"idref"}],"code":"$getFormEventData1.argument","source":"$getFormEventData1.argument"}},"name":"textReplace1","position":"-30,270","title":"Text Replace","transitions":[{"id":177,"inputs":{},"position":"90,400 90,450","target":{"id":165}}]},{"action":"gcx:wf:arcgis:query:QueryTask","description":"Query for features.","id":165,"inputs":{"outFields":"NAME","returnGeometry":false,"url":"https://dev.ffm.vic.gov.au/arcgis/rest/services/Incidents_all/MapServer/0","where":{"accessors":["$textReplace1"],"annotations":[{"count":13,"index":27,"kind":"idref"}],"code":"\"UPPER(NAME) LIKE UPPER('\".concat($textReplace1.result, \"%')\")","source":"`UPPER(NAME) LIKE UPPER('${$textReplace1.result}%')`"}},"name":"query1","position":"-30,450","title":"Query Layer","transitions":[{"id":181,"inputs":{},"position":"90,550 90,610 100,610 100,630","sourceConnector":"bottom","target":{"id":167}}]},{"action":"gcx:wf:forms::GetFormElementItemsFromFeatures","description":"Convert the features into form element items to be used in the element.","id":167,"inputs":{"features":{"accessors":["$query1"],"annotations":[{"count":7,"index":0,"kind":"idref"}],"code":"$query1.features","source":"$query1.features"},"labelFieldName":"NAME","valueFieldName":"NAME"},"name":"formElementItems1","position":"-20,630","title":"Get Form Element Items From Features","transitions":[{"id":185,"inputs":{},"position":"100,760 100,820","sourceConnector":"bottom","target":{"id":151}}]}],"title":"ArcGIS Query-otherObsFormIncidentName"},{"id":194,"steps":[{"action":"gcx:wf:core::Container","id":196,"inputs":{},"position":"-890,530","title":"Variables"},{"action":"gcx:wf:core::Container","id":198,"inputs":{},"position":"-890,390","title":"Inputs","transitions":[{"id":204,"inputs":{},"position":"-770,480 -770,530","target":{"id":196}}]},{"id":200,"inputs":{},"position":"-860,290","purpose":"start","title":"Container","transitions":[{"id":202,"inputs":{},"position":"-770,350 -770,390","sourceConnector":"bottom","target":{"id":198},"targetConnector":"top"}]}]},{"id":206,"steps":[{"action":"gcx:wf:core::CreateValue","description":"Used to populate date element within form","id":153,"inputs":{"expression":{"accessors":["Date"],"annotations":[{"count":4,"index":4,"kind":"idref"}],"code":"new Date().getTime()","source":"new Date().getTime()"}},"name":"currentDate","position":"-20,280","title":"Current Date/Time"},{"action":"gcx:wf:core::CreateValue","description":"Set to either layer or sublayer depending on your web map","id":210,"inputs":{"expression":{"accessors":["$getLayer"],"annotations":[{"count":9,"index":0,"kind":"idref"}],"code":"$getLayer.layer","source":"$getLayer.layer"}},"name":"layer","position":"-20,120","title":"Layer","transitions":[{"id":154,"inputs":{},"position":"100,240 100,280","target":{"id":153}}]},{"id":212,"inputs":{},"position":"10,10","purpose":"start","title":"Container","transitions":[{"id":139,"inputs":{},"position":"100,70 100,120","target":{"id":210}}]}]},{"id":218,"steps":[{"action":"gcx:wf:arcgis::GetLayer","description":"","id":144,"inputs":{"layerId":"Fire Hydrants"},"name":"getLayer","position":"-40,130","title":"*Get Layer","transitions":[{"id":146,"inputs":{},"position":"80,200 80,240","target":{"id":222}}]},{"action":"gcx:wf:core::CreateValue","id":222,"inputs":{"expression":"OBJECTID"},"name":"objectIdField","position":"-40,240","title":"*OBJECTID Field"},{"id":226,"inputs":{},"position":"-10,30","purpose":"start","title":"Container","transitions":[{"id":145,"inputs":{},"position":"80,90 80,130","target":{"id":144}}]}]},{"id":266,"steps":[{"action":"gcx:wf:core::CreateValue","id":241,"inputs":{"expression":{"accessors":[],"annotations":[],"code":"[\n    { \"label\": \"Ignition\", \"value\": \"Ignition\" },\n    { \"label\": \"Personnel\", \"value\": \"Personnel\" },\n    { \"label\": \"Machinery\", \"value\": \"Machinery\" },\n    { \"label\": \"Retain Old Trees\", \"value\": \"Retain Old Trees\" },\n    { \"label\": \"No Off Track Disturbance\", \"value\": \"No Off Track Disturbance\" },\n    { \"label\": \"Phytophthora\", \"value\": \"Phytophthora\" },\n    { \"label\": \"Active Coupe\", \"value\": \"Active Coupe\" },\n    { \"label\": \"Other\", \"value\": \"Other\" }\n]","source":"[\n{\"label\":\"Ignition\",\"value\":\"Ignition\"},\n{\"label\":\"Personnel\",\"value\":\"Personnel\"},\n{\"label\":\"Machinery\",\"value\":\"Machinery\"},\n{\"label\":\"Retain Old Trees\",\"value\":\"Retain Old Trees\"},\n{\"label\":\"No Off Track Disturbance\",\"value\":\"No Off Track Disturbance\"},\n{\"label\":\"Phytophthora\",\"value\":\"Phytophthora\"},\n{\"label\":\"Active Coupe\",\"value\":\"Active Coupe\"},\n{\"label\":\"Other\",\"value\":\"Other\"}\n]"}},"name":"valuesExclusionZone","position":"-630,440","title":"Create Value","transitions":[{"id":298,"inputs":{},"position":"-510,510 -510,610 -500,610 -500,630","sourceConnector":"bottom","target":{"id":294}}]},{"action":"gcx:wf:core::Switch","id":243,"inputs":{"value":{"accessors":["$valueObsType"],"annotations":[{"count":13,"index":0,"kind":"idref"}],"code":"$valueObsType.result","source":"$valueObsType.result"}},"position":"-30,240","title":"Switch","transitions":[{"id":235,"inputs":{},"position":"90,300 90,450","purpose":"default","sourceConnector":"bottom","target":{"id":261},"title":"2"},{"branch":"4","id":245,"inputs":{},"position":"30,300 30,320 -50,320 -50,475 -70,475","sourceConnector":"bottom-left","target":{"id":252}},{"branch":"3","id":287,"inputs":{},"position":"-30,270 -370,270 -370,475 -390,475","sourceConnector":"left","target":{"id":241}},{"branch":"0","id":289,"inputs":{},"position":"150,300 150,320 270,320 270,475 290,475","sourceConnector":"bottom-right","target":{"id":268}}]},{"action":"gcx:wf:forms::SetFormElementItems","id":251,"inputs":{"elementName":"otherObsFormSubType","form":{"accessors":["$$form"],"annotations":[{"count":6,"index":0,"kind":"idref"}],"code":"$$form","source":"$$form"},"items":{"accessors":["$valuesNaturalValues"],"annotations":[{"count":20,"index":0,"kind":"idref"}],"code":"$valuesNaturalValues.result","source":"$valuesNaturalValues.result"}},"position":"-320,630","title":"Set Form Element Items"},{"action":"gcx:wf:core::CreateValue","id":252,"inputs":{"expression":{"accessors":[],"annotations":[],"code":"[\n    { \"label\": \"Rainforest\", \"value\": \"Rainforest\" },\n    { \"label\": \"Peat\", \"value\": \"Peat\" },\n    { \"label\": \"Galaxias\", \"value\": \"Galaxias\" },\n    { \"label\": \"Regeneration\", \"value\": \"Regeneration\" },\n    { \"label\": \"Threatened Flora\", \"value\": \"Threatened Flora\" },\n    { \"label\": \"Threatened Fauna\", \"value\": \"Threatened Fauna\" },\n    { \"label\": \"Other\", \"value\": \"Other\" }\n]","source":"[\n{\"label\":\"Rainforest\",\"value\":\"Rainforest\"},\n{\"label\":\"Peat\",\"value\":\"Peat\"},\n{\"label\":\"Galaxias\",\"value\":\"Galaxias\"},\n{\"label\":\"Regeneration\",\"value\":\"Regeneration\"},\n{\"label\":\"Threatened Flora\",\"value\":\"Threatened Flora\"},\n{\"label\":\"Threatened Fauna\",\"value\":\"Threatened Fauna\"},\n{\"label\":\"Other\",\"value\":\"Other\"}\n]"}},"name":"valuesNaturalValues","position":"-310,440","title":"Create Value","transitions":[{"id":253,"inputs":{},"position":"-190,510 -190,610 -200,610 -200,630","sourceConnector":"bottom","target":{"id":251}}]},{"action":"gcx:wf:core::CreateValue","id":259,"inputs":{"expression":{"accessors":["$mainObsForm"],"annotations":[{"count":12,"index":0,"kind":"idref"}],"code":"$mainObsForm.state.dropDownListObsType.value","source":"$mainObsForm.state.dropDownListObsType.value"}},"name":"valueObsType","position":"-30,110","title":"Create Value","transitions":[{"id":284,"inputs":{},"position":"210,145 420,145 420,180","sourceConnector":"right","target":{"id":281},"targetConnector":"top"}]},{"action":"gcx:wf:core::CreateValue","id":261,"inputs":{"expression":{"accessors":[],"annotations":[],"code":"[\n    { \"label\": \"Current Burnt Area\", \"value\": \"CurrBurntArea\" }\n]","source":"[\n{\"label\":\"Current Burnt Area\",\"value\":\"CurrBurntArea\"}\n]"}},"name":"valuesCurrBurntArea","position":"-30,450","title":"Create Value","transitions":[{"id":270,"inputs":{},"position":"90,520 90,610 100,610 100,630","sourceConnector":"bottom","target":{"id":299}}]},{"action":"gcx:wf:core::CreateValue","id":268,"inputs":{"expression":{"accessors":[],"annotations":[],"code":"[\n    { \"label\": \"General Area\", \"value\": \"Gen\" }\n]","source":"[\n{\"label\":\"General Area\",\"value\":\"Gen\"}\n]"}},"name":"valuesGeneralArea","position":"290,440","title":"Create Value","transitions":[{"id":306,"inputs":{},"position":"410,510 410,630","sourceConnector":"bottom","target":{"id":304}}]},{"id":274,"inputs":{},"position":"0,0","purpose":"start","title":"Event","transitions":[{"id":262,"inputs":{},"position":"90,60 90,110","sourceConnector":"bottom","target":{"id":259}}]},{"action":"gcx:wf:core::Log","id":281,"inputs":{"message":{"accessors":["$valueObsType"],"annotations":[{"count":13,"index":0,"kind":"idref"}],"code":"$valueObsType.result","source":"$valueObsType.result"}},"position":"300,180","title":"Log","transitions":[{"id":285,"inputs":{},"position":"420,210 420,270 210,270","sourceConnector":"bottom","target":{"id":243}}]},{"action":"gcx:wf:forms::SetFormElementItems","id":294,"inputs":{"elementName":"otherObsFormSubType","form":{"accessors":["$$form"],"annotations":[{"count":6,"index":0,"kind":"idref"}],"code":"$$form","source":"$$form"},"items":{"accessors":["$valuesExclusionZone"],"annotations":[{"count":20,"index":0,"kind":"idref"}],"code":"$valuesExclusionZone.result","source":"$valuesExclusionZone.result"}},"position":"-620,630","title":"Set Form Element Items"},{"action":"gcx:wf:forms::SetFormElementItems","id":299,"inputs":{"elementName":"otherObsFormSubType","form":{"accessors":["$$form"],"annotations":[{"count":6,"index":0,"kind":"idref"}],"code":"$$form","source":"$$form"},"items":{"accessors":["$valuesCurrBurntArea"],"annotations":[{"count":20,"index":0,"kind":"idref"}],"code":"$valuesCurrBurntArea.result","source":"$valuesCurrBurntArea.result"}},"position":"-20,630","title":"Set Form Element Items"},{"action":"gcx:wf:forms::SetFormElementItems","id":304,"inputs":{"elementName":"otherObsFormSubType","form":{"accessors":["$$form"],"annotations":[{"count":6,"index":0,"kind":"idref"}],"code":"$$form","source":"$$form"},"items":{"accessors":["$valuesGeneralArea"],"annotations":[{"count":18,"index":0,"kind":"idref"}],"code":"$valuesGeneralArea.result","source":"$valuesGeneralArea.result"}},"position":"290,630","title":"Set Form Element Items"}],"title":"ArcGIS Query-otherObsFormSubType"},{"id":271,"steps":[{"id":272,"inputs":{},"position":"0,0","purpose":"start","title":"Event","transitions":[{"id":295,"inputs":{},"position":"90,60 90,100","sourceConnector":"bottom","target":{"id":291}}]},{"action":"gcx:wf:forms::SetFormElementItems","description":"Assign form element items to the element.","id":283,"inputs":{"elementName":"otherObsFormSource","form":{"accessors":["$$form"],"annotations":[{"count":6,"index":0,"kind":"idref"}],"code":"$$form","source":"$$form"},"items":{"accessors":["$formElementItems2"],"annotations":[{"count":18,"index":0,"kind":"idref"}],"code":"$formElementItems2.items","source":"$formElementItems2.items"}},"position":"-30,320","title":"Set Form Element Items"},{"action":"gcx:wf:arcgis::GetCodedValueDomain","id":291,"inputs":{"field":"SOURCE","url":"https://dev.ffm.vic.gov.au/arcgis/rest/services/Incidents_all/MapServer/20"},"name":"getCodedValueDomain1","position":"-30,100","title":"Get Coded Value Domain","transitions":[{"id":297,"inputs":{},"position":"90,170 90,200","sourceConnector":"bottom","target":{"id":301}}]},{"action":"gcx:wf:forms::GetFormElementItemsFromCollection","id":301,"inputs":{"collection":{"accessors":["$getCodedValueDomain1"],"annotations":[{"count":21,"index":0,"kind":"idref"}],"code":"$getCodedValueDomain1.domain.codedValues","source":"$getCodedValueDomain1.domain.codedValues"},"labelFieldName":"name","valueFieldName":"code"},"name":"formElementItems2","position":"-30,200","title":"Get Form Element Items From Collection","transitions":[{"id":303,"inputs":{},"position":"90,270 90,320","sourceConnector":"bottom","target":{"id":283}}]}],"title":"populate-otherObsFormSource"},{"id":276,"steps":[{"action":"gcx:wf:arcgis::SetFeatureAttribute","id":205,"inputs":{"attributeName":"LABEL","attributeValue":{"accessors":["$mainObsForm"],"annotations":[{"count":12,"index":0,"kind":"idref"}],"code":"$mainObsForm.state.otherObsFormMapLabel.value","source":"$mainObsForm.state.otherObsFormMapLabel.value"},"feature":{"accessors":["$feature"],"annotations":[{"count":8,"index":0,"kind":"idref"}],"code":"$feature.feature","source":"$feature.feature"}},"position":"-20,720","title":"*Set LABEL","transitions":[{"id":214,"inputs":{},"position":"100,750 100,780","sourceConnector":"bottom","target":{"id":213}}]},{"action":"gcx:wf:arcgis::SetFeatureAttribute","id":213,"inputs":{"attributeName":"SOURCE","attributeValue":{"accessors":["$mainObsForm"],"annotations":[{"count":12,"index":0,"kind":"idref"}],"code":"$mainObsForm.state.otherObsFormSource.value","source":"$mainObsForm.state.otherObsFormSource.value"},"feature":{"accessors":["$feature"],"annotations":[{"count":8,"index":0,"kind":"idref"}],"code":"$feature.feature","source":"$feature.feature"}},"position":"-20,780","title":"*Set SOURCE"},{"action":"gcx:wf:arcgis::ProjectServiceTask","id":217,"inputs":{"geometry":{"accessors":["$mainObsForm"],"annotations":[{"count":12,"index":0,"kind":"idref"}],"code":"$mainObsForm.state.geometryPickerObs.value.geometry[0]","source":"$mainObsForm.state.geometryPickerObs.value.geometry[0]"},"outSpatialReference":102171},"name":"projectGeometry","position":"-360,40","title":"Project Geometry","transitions":[{"id":220,"inputs":{},"position":"-120,75 -30,75 -30,130 -10,130","sourceConnector":"right","target":{"id":282}}]},{"id":277,"inputs":{},"position":"10,-70","purpose":"start","title":"Container Set Attributes","transitions":[{"id":267,"inputs":{},"position":"10,-40 -240,-40 -240,40","sourceConnector":"left","target":{"id":217},"targetConnector":"top"}]},{"action":"gcx:wf:arcgis::CreateGraphic","description":"Create the initial graphic to write values to","id":282,"inputs":{"geometry":{"accessors":["$projectGeometry"],"annotations":[{"count":16,"index":0,"kind":"idref"}],"code":"$projectGeometry.geometry","source":"$projectGeometry.geometry"}},"name":"feature","position":"-10,70","title":"Create Feature","transitions":[{"id":305,"inputs":{},"position":"110,190 110,240","sourceConnector":"bottom","target":{"id":309}}]},{"action":"gcx:wf:arcgis::SetFeatureAttribute","description":"","id":286,"inputs":{"attributeName":"OBS_DATE","attributeValue":{"accessors":["$valueLocalCurrTime"],"annotations":[{"count":19,"index":0,"kind":"idref"}],"code":"$valueLocalCurrTime.result","source":"$valueLocalCurrTime.result"},"feature":{"accessors":["$feature"],"annotations":[{"count":8,"index":0,"kind":"idref"}],"code":"$feature.feature","source":"$feature.feature"}},"position":"-360,460","title":"*Set OBS_DATE "},{"action":"gcx:wf:arcgis::SetFeatureAttribute","id":288,"inputs":{"attributeName":"COMMENTS","attributeValue":{"accessors":["$mainObsForm"],"annotations":[{"count":12,"index":0,"kind":"idref"}],"code":"$mainObsForm.state.otherObsFormComments.value","source":"$mainObsForm.state.otherObsFormComments.value"},"feature":{"accessors":["$feature"],"annotations":[{"count":8,"index":0,"kind":"idref"}],"code":"$feature.feature","source":"$feature.feature"}},"position":"-20,650","title":"*Set COMMENTS","transitions":[{"id":208,"inputs":{},"position":"100,680 100,720","sourceConnector":"bottom","target":{"id":205}}]},{"action":"gcx:wf:core::Container","description":"Get and Set Agency and Inc ID","id":309,"inputs":{},"position":"-10,240","title":"container","transitions":[{"id":308,"inputs":{},"position":"230,300 380,300 380,400","sourceConnector":"right","target":{"id":396},"targetConnector":"top"}]},{"action":"gcx:wf:arcgis::SetFeatureAttribute","id":331,"inputs":{"attributeName":"FIRE_OBS_TYPE_PY","attributeValue":{"accessors":["$mainObsForm"],"annotations":[{"count":12,"index":0,"kind":"idref"}],"code":"$mainObsForm.state.otherObsFormSubType.value","source":"$mainObsForm.state.otherObsFormSubType.value"},"feature":{"accessors":["$feature"],"annotations":[{"count":8,"index":0,"kind":"idref"}],"code":"$feature.feature","source":"$feature.feature"}},"position":"-20,580","title":"*Set FIRE_OBS_TYPE_PY","transitions":[{"id":263,"inputs":{},"position":"100,610 100,650","sourceConnector":"bottom","target":{"id":288}}]},{"action":"gcx:wf:core::CreateValue","description":"get UTC offset to add to obs dates","id":386,"inputs":{"expression":{"accessors":["Date"],"annotations":[{"count":4,"index":4,"kind":"idref"}],"code":"new Date().getTimezoneOffset() * 60","source":"new Date().getTimezoneOffset() * 60"}},"name":"valueUtcOffset","position":"-360,190","title":"Create Value","transitions":[{"id":392,"inputs":{},"position":"-240,310 -240,360","sourceConnector":"bottom","target":{"id":391}}]},{"action":"gcx:wf:core::CreateValue","id":391,"inputs":{"expression":{"accessors":["$mainObsForm","$valueUtcOffset"],"annotations":[{"count":12,"index":0,"kind":"idref"},{"count":15,"index":57,"kind":"idref"}],"code":"$mainObsForm.state.otherObsFormObsDateTime.value.value + $valueUtcOffset","source":"$mainObsForm.state.otherObsFormObsDateTime.value.value + $valueUtcOffset"}},"name":"valueLocalCurrTime","position":"-360,360","title":"Create Value"},{"action":"gcx:wf:arcgis::SetFeatureAttribute","id":396,"inputs":{"attributeName":"OBS_DATE","attributeValue":{"accessors":["$mainObsForm"],"annotations":[{"count":12,"index":0,"kind":"idref"}],"code":"$mainObsForm.state.otherObsFormObsDateTime.value.value","source":"$mainObsForm.state.otherObsFormObsDateTime.value.value"},"feature":{"accessors":["$feature"],"annotations":[{"count":8,"index":0,"kind":"idref"}],"code":"$feature.feature","source":"$feature.feature"}},"position":"260,400","title":"Set OBS_DATE","transitions":[{"id":191,"inputs":{},"position":"380,430 380,535 220,535","sourceConnector":"bottom","target":{"id":405}}]},{"action":"gcx:wf:arcgis::SetFeatureAttribute","id":405,"inputs":{"attributeName":"INCIDENT_NAME","attributeValue":{"accessors":["$mainObsForm"],"annotations":[{"count":12,"index":0,"kind":"idref"}],"code":"$mainObsForm.state.otherObsFormIncidentName.value","source":"$mainObsForm.state.otherObsFormIncidentName.value"},"feature":{"accessors":["$feature"],"annotations":[{"count":8,"index":0,"kind":"idref"}],"code":"$feature.feature","source":"$feature.feature"}},"position":"-20,520","title":"*Set INCIDENT_NAME","transitions":[{"id":255,"inputs":{},"position":"100,550 100,580","sourceConnector":"bottom","target":{"id":331}}]}]},{"id":310,"steps":[{"id":311,"inputs":{},"position":"0,0","purpose":"start","title":"Container","transitions":[{"id":332,"inputs":{},"position":"90,60 90,170","sourceConnector":"bottom","target":{"id":323}}]},{"action":"gcx:wf:arcgis::GetAttributeValue","id":319,"inputs":{"attribute":"INC_ID","features":{"accessors":["$queryForAgencyAndID"],"annotations":[{"count":20,"index":0,"kind":"idref"}],"code":"$queryForAgencyAndID.feature","source":"$queryForAgencyAndID.feature"}},"name":"attributeValueIncNumber","position":"-30,380","title":"Get Feature Attribute Value","transitions":[{"id":340,"inputs":{},"position":"90,450 90,480 80,480 80,500","sourceConnector":"bottom","target":{"id":339}}]},{"action":"gcx:wf:arcgis::GetAttributeValue","id":321,"inputs":{"attribute":"Agency","features":{"accessors":["$queryForAgencyAndID"],"annotations":[{"count":20,"index":0,"kind":"idref"}],"code":"$queryForAgencyAndID.feature","source":"$queryForAgencyAndID.feature"}},"name":"attributeValueAgency","position":"-30,280","title":"Get Feature Attribute Value","transitions":[{"id":325,"inputs":{},"position":"90,350 90,380","sourceConnector":"bottom","target":{"id":319}}]},{"action":"gcx:wf:arcgis:query:QueryTask","id":323,"inputs":{"outFields":"AGENCY,INC_ID","url":"https://dev.ffm.vic.gov.au/arcgis/rest/services/Incidents_all/MapServer/0","where":{"accessors":["$mainObsForm"],"annotations":[{"count":12,"index":17,"kind":"idref"}],"code":"\"NAME = \" + \"'\" + $mainObsForm.state.otherObsFormIncidentName.value + \"'\"","source":"\"NAME = \"+ \"'\" + $mainObsForm.state.otherObsFormIncidentName.value + \"'\"\n"}},"name":"queryForAgencyAndID","position":"-30,170","title":"Query Layer","transitions":[{"id":328,"inputs":{},"position":"90,240 90,280","sourceConnector":"bottom","target":{"id":321}}]},{"action":"gcx:wf:arcgis::SetFeatureAttribute","id":338,"inputs":{"attributeName":"DSE_ID","attributeValue":{"accessors":["$attributeValueIncNumber"],"annotations":[{"count":24,"index":0,"kind":"idref"}],"code":"$attributeValueIncNumber.value","source":"$attributeValueIncNumber.value"},"feature":{"accessors":["$feature"],"annotations":[{"count":8,"index":0,"kind":"idref"}],"code":"$feature.feature","source":"$feature.feature"}},"position":"-420,690","title":"*Set DEPI_ID"},{"action":"gcx:wf:core::Switch","id":339,"inputs":{"value":{"accessors":["$attributeValueAgency"],"annotations":[{"count":21,"index":0,"kind":"idref"}],"code":"$attributeValueAgency.value","source":"$attributeValueAgency.value"}},"position":"-40,500","title":"Switch","transitions":[{"id":341,"inputs":{},"position":"20,560 20,580 -160,580 -160,705 -180,705","purpose":"default","sourceConnector":"bottom-left","target":{"id":338},"title":"DEPI"},{"branch":"CFA","id":351,"inputs":{},"position":"80,560 80,670 -10,670 -10,690","sourceConnector":"bottom","target":{"id":350}},{"branch":"MFB","id":358,"inputs":{},"position":"140,560 140,580 160,580 160,695 180,695","sourceConnector":"bottom-right","target":{"id":357}},{"branch":"SES","id":362,"inputs":{},"position":"200,530 340,530 340,635 360,635","sourceConnector":"right","target":{"id":361}}]},{"action":"gcx:wf:arcgis::SetFeatureAttribute","id":350,"inputs":{"attributeName":"CFA_ID","attributeValue":{"accessors":["$attributeValueIncNumber"],"annotations":[{"count":24,"index":0,"kind":"idref"}],"code":"$attributeValueIncNumber.value","source":"$attributeValueIncNumber.value"},"feature":{"accessors":["$feature"],"annotations":[{"count":8,"index":0,"kind":"idref"}],"code":"$feature.feature","source":"$feature.feature"}},"position":"-130,690","title":"*Set DEPI_ID"},{"action":"gcx:wf:arcgis::SetFeatureAttribute","id":357,"inputs":{"attributeName":"MFB_ID","attributeValue":{"accessors":["$attributeValueIncNumber"],"annotations":[{"count":24,"index":0,"kind":"idref"}],"code":"$attributeValueIncNumber.value","source":"$attributeValueIncNumber.value"},"feature":{"accessors":["$feature"],"annotations":[{"count":8,"index":0,"kind":"idref"}],"code":"$feature.feature","source":"$feature.feature"}},"position":"180,680","title":"*Set DEPI_ID"},{"action":"gcx:wf:arcgis::SetFeatureAttribute","id":361,"inputs":{"attributeName":"SES_ID","attributeValue":{"accessors":["$attributeValueIncNumber"],"annotations":[{"count":24,"index":0,"kind":"idref"}],"code":"$attributeValueIncNumber.value","source":"$attributeValueIncNumber.value"},"feature":{"accessors":["$feature"],"annotations":[{"count":8,"index":0,"kind":"idref"}],"code":"$feature.feature","source":"$feature.feature"}},"position":"360,620","title":"*Set DEPI_ID"}]},{"id":314,"steps":[{"id":316,"inputs":{},"position":"0,0","purpose":"start","title":"Event","transitions":[{"id":371,"inputs":{},"position":"90,60 90,130 100,130 100,150","sourceConnector":"bottom","target":{"id":364}}]},{"action":"gcx:wf:forms::SetFormElementProperty","id":329,"inputs":{"form":{"accessors":["$$form"],"annotations":[{"count":6,"index":0,"kind":"idref"}],"code":"$$form","source":"$$form"},"propertyName":"value","propertyValue":{"accessors":["$valueCurrDateTime"],"annotations":[{"count":18,"index":0,"kind":"idref"}],"code":"$valueCurrDateTime.result","source":"$valueCurrDateTime.result"}},"position":"-30,360","title":"Set Current Date"},{"action":"gcx:wf:core::CreateValue","id":364,"inputs":{"expression":{"accessors":["Date"],"annotations":[{"count":4,"index":4,"kind":"idref"}],"code":"new Date().getTime()","source":"new Date().getTime()"}},"name":"valueCurrDateTime","position":"-20,150","title":"Create Value","transitions":[{"id":366,"inputs":{},"position":"100,220 100,340 90,340 90,360","sourceConnector":"bottom","target":{"id":329}}]}],"title":"load-otherObsFormObsDateTime"},{"id":346,"steps":[{"action":"gcx:wf:arcgis::RefreshLayer","id":342,"inputs":{"layer":{"accessors":["$layer"],"annotations":[{"count":6,"index":0,"kind":"idref"}],"code":"$layer.result","source":"$layer.result"}},"position":"-430,330","title":"Refresh Layer"},{"action":"gcx:wf:ui::Alert","id":344,"inputs":{"text":{"accessors":["$feature"],"annotations":[{"count":8,"index":0,"kind":"idref"}],"code":"$feature.feature.geometry.spatialReference.wkid.toString()","source":"$feature.feature.geometry.spatialReference.wkid.toString()"}},"position":"-340,80","title":"Alert"},{"id":347,"inputs":{},"position":"0,10","purpose":"start","title":"Container"},{"action":"gcx:wf:core::CreateValue","id":352,"inputs":{"expression":{"accessors":["$addFeature"],"annotations":[{"count":11,"index":0,"kind":"idref"}],"code":"$addFeature.results[0].objectId","source":"$addFeature.results[0].objectId"}},"name":"objectid","position":"-440,220","title":"Get OBJECTID"},{"action":"gcx:wf:arcgis::AddGraphicsLayerFeatures","id":355,"inputs":{"features":{"accessors":["$projectGeometry"],"annotations":[{"count":16,"index":0,"kind":"idref"}],"code":"$projectGeometry.result","source":"$projectGeometry.result"}},"name":"addGraphics1","position":"-420,410","title":"Add Graphics"}]}],"deploymentConfig":{"supportedApps":{"GWV":true}},"designerVersion":"5.32.0+12","forms":[{"defaults":{},"elements":{"addSection":{"description":{"markdown":"Create a new feature using the attribute inputs below"},"enabled":true,"index":0,"rowIndex":0,"rowNumber":0,"title":{"markdown":"# Add Obs Area"},"type":"Section"},"dropDownListObsType":{"description":{"markdown":""},"enabled":true,"index":2,"items":{"0":{"index":0,"label":"Current Burnt Area","value":"2"},"1":{"index":1,"label":"General Area","value":"0"},"2":{"index":2,"label":"Exclusion Zone","value":"3"},"3":{"index":3,"label":"Natural Values","value":"4"}},"rowIndex":0,"rowNumber":2,"section":{"name":"addSection"},"title":{"markdown":"Main Observation Type"},"type":"DropDownList"},"footer":{"enabled":true,"items":{"0":{"default":true,"index":0,"label":{"markdown":"Add Feature"},"validates":true,"value":"add"},"1":{"index":1,"label":{"markdown":"Cancel"},"validates":false,"value":"cancel"}},"section":"footer","type":"ButtonBar"},"geometryPickerObs":{"description":{"markdown":"Define the Polygon for the Observation Area"},"enabled":true,"format":"polygon","index":9,"itemLabel":{"markdown":"Location"},"prompt":{"markdown":"Sketch Obs Area"},"require":true,"rowIndex":0,"rowNumber":9,"section":{"name":"addSection"},"size":1,"title":{"markdown":""},"type":"GeometryPicker"},"header":{"section":"header","title":{"markdown":""},"type":"Header"},"horizontalRule":{"enabled":true,"index":1,"rowIndex":0,"rowNumber":1,"section":{"name":"addSection"},"type":"HorizontalRule"},"otherObsFormComments":{"enabled":true,"index":7,"rowIndex":0,"rowNumber":7,"section":{"name":"addSection"},"size":3,"title":{"markdown":"Comments"},"type":"TextArea","wrap":"soft"},"otherObsFormIncidentName":{"enabled":true,"index":4,"prompt":"Start typing an Incident Name","require":true,"rowIndex":0,"rowNumber":4,"section":{"name":"addSection"},"title":{"markdown":"Incident List"},"titleLocation":"above","type":"AutoComplete"},"otherObsFormMapLabel":{"enabled":true,"index":8,"rowIndex":0,"rowNumber":8,"section":{"name":"addSection"},"size":2,"title":{"markdown":"Map Label"},"type":"TextArea","wrap":"soft"},"otherObsFormObsDateTime":{"enabled":true,"index":5,"require":true,"rowIndex":0,"rowNumber":5,"section":{"name":"addSection"},"title":{"markdown":"Date Time"},"type":"DateTimePicker"},"otherObsFormSource":{"enabled":true,"index":6,"items":{},"rowIndex":0,"rowNumber":6,"section":{"name":"addSection"},"title":{"markdown":"Source"},"type":"DropDownList"},"otherObsFormSubType":{"dependsOn":"dropDownListObsType","index":3,"items":{"0":{"index":0,"label":{"markdown":"Option1"}},"1":{"index":1,"label":{"markdown":"Option2"}},"2":{"index":2,"label":{"markdown":"Option3"}}},"require":true,"rowIndex":0,"rowNumber":3,"section":{"name":"addSection"},"title":{"markdown":"Select Sub-type of Observation"},"type":"DropDownList"}},"id":234},{"defaults":{},"elements":{"addSection":{"description":{"markdown":""},"enabled":true,"index":0,"rowIndex":0,"rowNumber":0,"title":{"markdown":"# Add Obs Area"},"type":"Section"},"footer":{"enabled":true,"items":{"0":{"default":true,"index":0,"label":{"markdown":"OK"},"validates":true,"value":"ok"},"1":{"index":1,"label":{"markdown":"Cancel"},"validates":false,"value":"cancel"}},"section":"footer","type":"ButtonBar"},"geometryPicker1":{"enabled":true,"format":"polygon","index":3,"itemLabel":{"markdown":"Location"},"prompt":{"markdown":"Start drawing polygon"},"require":true,"rowIndex":0,"rowNumber":3,"section":{"name":"addSection"},"size":1,"title":{"markdown":"Add Geometry"},"titleLocation":"beside","type":"GeometryPicker"},"header":{"section":"header","title":{"markdown":""},"type":"Header"},"horizontalRule":{"enabled":true,"index":1,"rowIndex":0,"rowNumber":1,"section":{"name":"addSection"},"type":"HorizontalRule"},"listBox1":{"enabled":true,"index":2,"items":{"0":{"checked":true,"index":0,"label":"Current Burnt Area","value":"2"},"1":{"index":1,"label":"General Area","value":"0"},"2":{"index":2,"label":"Exclusion Zone","value":"3"},"3":{"index":3,"label":"Natural Values","value":"4"}},"rowIndex":0,"rowNumber":2,"section":{"name":"addSection"},"title":{"markdown":"Choose Intial Type"},"type":"ListBox"}},"id":442}],"licenseInfo":{"licenseUrl":"https://azmdwmapweb03.ffm.vic.gov.au/vertigisstudio/workflow/service/auth/license"},"start":{"id":3},"steps":[{"id":193,"inputs":{}},{"id":257,"inputs":{}},{"id":296,"inputs":{}}],"transitions":[{"branch":"suggest$otherObsFormIncidentName","id":189,"inputs":{},"source":{"id":238},"target":{"id":156}},{"branch":"content","id":244,"inputs":{},"source":{"id":236},"target":{"id":200}},{"branch":"content","id":250,"inputs":{},"source":{"id":242},"target":{"id":142}},{"branch":"content","id":258,"inputs":{},"source":{"id":198},"target":{"id":226}},{"branch":"content","id":260,"inputs":{},"source":{"id":196},"target":{"id":212}},{"branch":"populate$otherObsFormSource","id":273,"inputs":{},"source":{"id":238},"target":{"id":272}},{"branch":"content","id":278,"inputs":{},"source":{"id":275},"target":{"id":277}},{"branch":"populate$otherObsFormSubType","id":293,"inputs":{},"source":{"id":238},"target":{"id":274}},{"branch":"content","id":313,"inputs":{},"source":{"id":309},"target":{"id":311}},{"branch":"load$otherObsFormObsDateTime","id":318,"inputs":{},"source":{"id":238},"target":{"id":316}},{"branch":"content","id":348,"inputs":{},"source":{"id":345},"target":{"id":347}}]}

    0
  • Sean McClurkan

    Thanks, Gareth. If the workflow is shared with Public you can me give that link and I can import it from there.

    0
  • Sean McClurkan

    Never mind, Gareth. I was able to copy and paste the JSON into a file I could import. 

    The old "Project Geometry" trick.  Makes the same output as all the above. It creates a feature, adds it and queries it back - but the viewer will NOT draw it in the map. . . .

    My workflow stops dead on the Run Command results.display for this feature.

    But not from features that are queried from a map service versus one that was drawn in the geometry picker.

    0
  • Gareth Finney

    I've not really used the results.display command. If I'm just showing the user input as a 'markup' I've been using :

    map.add-markup, and passing in either the user drawing, or features returned from a query layer activity.. 

    0
  • Sean McClurkan

    Yeah. I think we're running into a case of just not being consistent in the way we're drawing/displaying features in our map among various workflows we're converting to work in Studio Web.

    Thanks for all the responses!

    0

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