{"_properties":{"isServerWorkflow":false},"components":[{"id":1,"steps":[{"id":2,"inputs":{},"position":"0,0","purpose":"start","title":"Start","transitions":[{"id":61,"position":"90,60 90,110","target":{"id":60}}]},{"action":"gcx:wf:arcgis:query:QueryTask","id":5,"inputs":{"layer":{"accessors":["$layer1"],"annotations":[{"count":7,"index":0,"kind":"idref"}],"code":"$layer1.layer","source":"$layer1.layer"},"outFields":"*","outSpatialReference":{"accessors":["$mapExtent1"],"annotations":[{"count":11,"index":0,"kind":"idref"}],"code":"$mapExtent1.extent.spatialReference","source":"$mapExtent1.extent.spatialReference"},"returnGeometry":true,"where":{"accessors":["$form1"],"annotations":[{"count":6,"index":11,"kind":"idref"}],"code":"`STREET='${$form1.state.autoComplete1.label}'`","source":"`STREET='${$form1.state.autoComplete1.label}'`"}},"name":"query1","position":"-30,500","title":"Query Layer","transitions":[{"id":9,"inputs":{},"position":"90,560 90,630","sourceConnector":"bottom","target":{"id":8}}]},{"action":"gcx:wf:app::RunOperation","description":"results.from-graphics","id":8,"inputs":{"operationName":"results.from-graphics","operationParameter":{"accessors":["$query1"],"annotations":[{"count":7,"index":15,"kind":"idref"}],"code":"{\n    graphics: $query1.results\n}","source":"{\n    graphics:$query1.results\n}"}},"name":"runOperation1","position":"-30,630","title":"Run Operation","transitions":[{"id":19,"inputs":{},"position":"90,720 90,780","sourceConnector":"bottom","target":{"id":18}}]},{"action":"gcx:wf:app::RunCommand","description":"system.download-file","id":16,"inputs":{"commandName":"system.download-file","commandParameter":{"accessors":["$runOperation2"],"annotations":[{"count":14,"index":0,"kind":"idref"}],"code":"$runOperation2.result","source":"$runOperation2.result"}},"position":"-30,930","title":"Run Command"},{"action":"gcx:wf:app::RunOperation","description":"results.convert-to-xlsx","id":18,"inputs":{"operationName":"results.convert-to-xlsx","operationParameter":{"accessors":["$runOperation1","$mapExtent1","$mapExtent1","$form1"],"annotations":[{"count":14,"index":15,"kind":"idref"},{"count":11,"index":156,"kind":"idref"},{"count":11,"index":218,"kind":"idref"},{"count":6,"index":352,"kind":"idref"}],"code":"{\n    features: $runOperation1.result,\n    escapeFormulaChars: false,\n    includeHeaderRow: true,\n    geometryFormat: \"ARCGIS_JSON\",\n    inSpatialReference: $mapExtent1.extent.spatialReference,\n    outSpatialReference: $mapExtent1.extent.spatialReference,\n    dateFormat: \"d\",\n    numberFormat: \"n\",\n    outFields: \"*\",\n    sheetName: \"Buildings on \" + $form1.state.autoComplete1.label\n}","source":"{\n    features:$runOperation1.result,\n    escapeFormulaChars: false,\n    includeHeaderRow: true,\n    geometryFormat: \"ARCGIS_JSON\",\n    inSpatialReference: $mapExtent1.extent.spatialReference,\n    outSpatialReference: $mapExtent1.extent.spatialReference,\n    dateFormat: \"d\",\n    numberFormat: \"n\",\n    outFields: \"*\",\n    sheetName: \"Buildings on \" + $form1.state.autoComplete1.label\n}"}},"name":"runOperation2","position":"-30,780","title":"Run Operation","transitions":[{"id":20,"inputs":{},"position":"90,870 90,930","sourceConnector":"bottom","target":{"id":16}}]},{"action":"gcx:wf:core::Annotation","description":"This example is to demonstrate how to use Web operations and commands to export data from a query as an XLSX file.  It uses **results.from-graphics**, **results.convert-to-xlsx**, and **system.download-file**, just like Web's standard \"Export to XLSX\" command does.\n\nThe results.convert-to-xlsx operation has been configured with a **ToXLSXConversionArgs** argument.\n\nBecause it references a specific layer, it is intended to be run with the \"Web GIS Default\" template app that is available inside Web Designer's File > New menu.","id":23,"inputs":{},"position":"-320,110","title":"Notes"},{"action":"gcx:wf:forms:form:DisplayForm","id":52,"inputs":{"form":{"accessors":[],"code":"resources.forms[values.id]","values":{"id":50}}},"name":"form1","position":"-30,320","title":"Display Form","transitions":[{"id":56,"position":"90,440 90,500","target":{"id":5}}]},{"action":"gcx:wf:arcgis::GetLayer","id":57,"inputs":{"layerId":"Buildings"},"name":"layer1","position":"-30,220","title":"Get Layer","transitions":[{"id":59,"position":"90,280 90,320","target":{"id":52}}]},{"action":"gcx:wf:arcgis::GetViewExtent","id":60,"inputs":{},"name":"mapExtent1","position":"-30,110","title":"Get Map Extent","transitions":[{"id":62,"position":"90,170 90,220","sourceConnector":"bottom","target":{"id":57}}]}]},{"id":26,"steps":[{"action":"gcx:wf:forms::SetFormElementItems","description":"Assign form element items to the element.","id":28,"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":"-30,750","title":"Set Form Element Items"},{"id":30,"inputs":{},"position":"0,0","purpose":"start","title":"Event","transitions":[{"id":40,"inputs":{},"position":"90,60 90,110","target":{"id":32}}]},{"action":"gcx:wf:forms::GetFormEventData","description":"Get the current value from the AutoComplete element.","id":32,"inputs":{"form":{"accessors":["$$form"],"annotations":[{"count":6,"index":0,"kind":"idref"}],"code":"$$form","source":"$$form"}},"name":"formEventData1","position":"-30,110","title":"Get Form Event Data","transitions":[{"id":42,"inputs":{},"position":"90,220 90,270","target":{"id":34}}]},{"action":"gcx:wf:core::TextReplace","description":"Escape apostrophe characters to avoid SQL injection and broken queries.","id":34,"inputs":{"newValue":"''","oldValue":"'","text":{"accessors":["$formEventData1"],"annotations":[{"count":15,"index":0,"kind":"idref"}],"code":"$formEventData1.argument","source":"$formEventData1.argument"}},"name":"textReplace1","position":"-30,270","title":"Text Replace","transitions":[{"id":44,"inputs":{},"position":"90,390 90,440","target":{"id":36}}]},{"action":"gcx:wf:arcgis:query:QueryTask","description":"Query for features.","id":36,"inputs":{"layer":{"accessors":["$layer1"],"annotations":[{"count":7,"index":0,"kind":"idref"}],"code":"$layer1.layer","source":"$layer1.layer"},"outFields":"STREET","returnDistinctValues":true,"returnGeometry":false,"where":{"accessors":["$textReplace1"],"annotations":[{"count":13,"index":29,"kind":"idref"}],"code":"`UPPER(STREET) LIKE UPPER('${$textReplace1.result}%')`","source":"`UPPER(STREET) LIKE UPPER('${$textReplace1.result}%')`"}},"name":"query2","position":"-30,440","title":"Query Layer","transitions":[{"id":46,"inputs":{},"position":"90,530 90,580","target":{"id":38}}]},{"action":"gcx:wf:forms::GetFormElementItemsFromFeatures","description":"Convert the features into form element items to be used in the element.","id":38,"inputs":{"features":{"accessors":["$query2"],"annotations":[{"count":7,"index":0,"kind":"idref"}],"code":"$query2.features","source":"$query2.features"},"labelFieldName":"STREET","valueFieldName":"STREET"},"name":"formElementItems1","position":"-30,580","title":"Get Form Element Items From Features","transitions":[{"id":48,"inputs":{},"position":"90,700 90,750","target":{"id":28}}]}],"title":"suggest-autoComplete1"}],"deploymentConfig":{"supportedApps":{"VSW":true}},"designerVersion":"5.53.0+6","forms":[{"defaults":{},"elements":{"autoComplete1":{"description":{"markdown":"eg. type WHARF ST"},"enabled":true,"prompt":{"markdown":"Start typing a value"},"rowIndex":0,"rowNumber":0,"title":{"markdown":"Street Name"},"type":"AutoComplete"},"footer":{"enabled":true,"items":{"0":{"default":true,"index":0,"label":{"markdown":"Download Buildings"},"validates":true,"value":"submit"}},"section":"footer","type":"ButtonBar"},"header":{"section":"header","title":{"markdown":"Form Title"},"type":"Header"}},"id":50}],"licenseInfo":{"licenseeId":"6186c77c-832c-031f-68e7-15ddb2c47678"},"start":{"id":2},"transitions":[{"branch":"suggest$autoComplete1","id":54,"inputs":{},"source":{"id":52},"target":{"id":30}}]}