<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Workforce - Import Assignments from a CSV - Script geometry help in ArcGIS Workforce Questions</title>
    <link>https://community.esri.com/t5/arcgis-workforce-questions/workforce-import-assignments-from-a-csv-script/m-p/804407#M648</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You'll want to change how the geometry is created. In the script this is created from the X,Y, and spatial reference. You can see it here: &lt;A class="link-titled" href="https://github.com/Esri/workforce-scripts/blob/master/scripts/create_assignments_from_csv.py#L135" title="https://github.com/Esri/workforce-scripts/blob/master/scripts/create_assignments_from_csv.py#L135"&gt;workforce-scripts/create_assignments_from_csv.py at master · Esri/workforce-scripts · GitHub&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is un-tested but I think you want to do something like:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;geometry =&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "x": row["x"],&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "y": row["y],&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "spatialReference": {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "wkid": 102100&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Aug 2020 14:13:16 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2020-08-19T14:13:16Z</dc:date>
    <item>
      <title>Workforce - Import Assignments from a CSV - Script geometry help</title>
      <link>https://community.esri.com/t5/arcgis-workforce-questions/workforce-import-assignments-from-a-csv-script/m-p/804406#M647</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm a novice at best with Python scripting but it's on the top of the list of things for me to&amp;nbsp;figure out&amp;nbsp;so our organization can more fully utilize Workforce.&amp;nbsp; I've had success running the title script in the Python Command Prompt written like this:&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;python create_assignments_from_csv.py -csv-file "N:\RDA_exported_assignments.csv" -u &amp;lt;username&amp;gt; -p &amp;lt;password&amp;gt; -org "&lt;A href="https://piercecowa.maps.arcgis.com"&gt;https://&amp;lt;our org&amp;gt;.maps.arcgis.com&lt;/A&gt;" -project-id "&amp;lt;xxxxxxxxxxxxxxxxxxxxxxxxxxxx&amp;gt;" -x-field "xField" -y-field "yField" -assignment-type-field "AssignmentType" -location-field "Location" -description-field "Description" -priority-field "Priority"&amp;nbsp;&amp;nbsp; -wkid 102100 -log-file "N:\Rapid Damage Assessment\log.txt" -timezone "US/Pacific"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again, this worked.&amp;nbsp; However I can't seem to get the same script to work in a Jupyter notebook. The sample notebook geocodes&amp;nbsp;an address to an x,y location which I already have.&amp;nbsp; My&amp;nbsp;assignments csv does not have addresses, only&amp;nbsp;x,y location&amp;nbsp;in separate columns (exported from the Assignments Point Layer - see sample below) as the points are along river levees and don't necessarily have addresses, and i used the location field in Workforce for the name of the levee that is to be inspected.&amp;nbsp;How do I get the script to recognize my x,y data?&amp;nbsp; I've tried converting the x,y data into a single column titled SHAPE with formatting like this:&amp;nbsp;{"x": -122.366238, "y": 47.22577965}.&amp;nbsp; This seemed to work but as the script created the assignments,&amp;nbsp; there was no&amp;nbsp;symbology for the new assignments&amp;nbsp;- similar to the discussion here:&amp;nbsp;&lt;A href="https://community.esri.com/thread/214532"&gt;Workforce 'create assignments from csv' script - no assignments symbolized on map&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm really hoping to use notebooks rather than Command Prompt scripts so I can document processes and share more easily.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm pretty sure I need to change at least the geometry line(s)?&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/503861_pastedImage_4.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://github.com/Esri/workforce-scripts/blob/master/notebooks/examples/2%20-%20Importing%20Assignments.ipynb" title="https://github.com/Esri/workforce-scripts/blob/master/notebooks/examples/2%20-%20Importing%20Assignments.ipynb"&gt;workforce-scripts/2 - Importing Assignments.ipynb at master · Esri/workforce-scripts · GitHub&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is a sample of the csv that works with the Command Prompt script. I know I can delete a lot of these fields, and please let me know if I &lt;EM&gt;should.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE width="2698"&gt;&lt;TBODY&gt;&lt;TR style="height: 25px;"&gt;&lt;TD style="height: 25px;" width="68"&gt;OBJECTID&lt;/TD&gt;&lt;TD style="height: 25px;" width="93"&gt;xField&lt;/TD&gt;&lt;TD style="height: 25px;" width="88"&gt;yField&lt;/TD&gt;&lt;TD style="height: 25px;" width="199"&gt;Description&lt;/TD&gt;&lt;TD style="height: 25px;" width="68"&gt;Status&lt;/TD&gt;&lt;TD style="height: 25px;" width="68"&gt;Notes&lt;/TD&gt;&lt;TD style="height: 25px;" width="68"&gt;Priority&lt;/TD&gt;&lt;TD style="height: 25px;" width="160"&gt;AssignmentType&lt;/TD&gt;&lt;TD style="height: 25px;" width="68"&gt;WorkOrderId&lt;/TD&gt;&lt;TD style="height: 25px;" width="68"&gt;DueDate&lt;/TD&gt;&lt;TD style="height: 25px;" width="68"&gt;WorkerId&lt;/TD&gt;&lt;TD style="height: 25px;" width="263"&gt;GlobalID&lt;/TD&gt;&lt;TD style="height: 25px;" width="326"&gt;Location&lt;/TD&gt;&lt;TD style="height: 25px;" width="68"&gt;DeclinedComment&lt;/TD&gt;&lt;TD style="height: 25px;" width="68"&gt;AssignedDate&lt;/TD&gt;&lt;TD style="height: 25px;" width="68"&gt;AssignmentRead&lt;/TD&gt;&lt;TD style="height: 25px;" width="68"&gt;InProgressDate&lt;/TD&gt;&lt;TD style="height: 25px;" width="68"&gt;CompletedDate&lt;/TD&gt;&lt;TD style="height: 25px;" width="68"&gt;DeclinedDate&lt;/TD&gt;&lt;TD style="height: 25px;" width="68"&gt;PausedDate&lt;/TD&gt;&lt;TD style="height: 25px;" width="267"&gt;DispatcherId&lt;/TD&gt;&lt;TD style="height: 25px;" width="107"&gt;CreationDate&lt;/TD&gt;&lt;TD style="height: 25px;" width="68"&gt;Creator&lt;/TD&gt;&lt;TD style="height: 25px;" width="107"&gt;EditDate&lt;/TD&gt;&lt;TD style="height: 25px;" width="68"&gt;Editor&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 51px;"&gt;&lt;TD style="height: 51px;"&gt;5&lt;/TD&gt;&lt;TD style="height: 51px;"&gt;-13621747.3&lt;/TD&gt;&lt;TD style="height: 51px;"&gt;5979005.241&lt;/TD&gt;&lt;TD style="height: 51px;"&gt;Puyallup Left: MP3.0 - 6.8&lt;/TD&gt;&lt;TD colspan="2" style="height: 51px;"&gt;unassigned&lt;/TD&gt;&lt;TD style="height: 51px;"&gt;high&lt;/TD&gt;&lt;TD style="height: 51px;"&gt;Levee Assessment - Drive&lt;/TD&gt;&lt;TD style="height: 51px;"&gt;Zone 1&lt;/TD&gt;&lt;TD style="height: 51px;"&gt;&lt;/TD&gt;&lt;TD style="height: 51px;"&gt;&lt;/TD&gt;&lt;TD style="height: 51px;"&gt;e99c5014-0d2a-4a8b-9dab-278c052f703d&lt;/TD&gt;&lt;TD style="height: 51px;"&gt;River Road Levee&lt;/TD&gt;&lt;TD style="height: 51px;"&gt;&lt;/TD&gt;&lt;TD style="height: 51px;"&gt;&lt;/TD&gt;&lt;TD style="height: 51px;"&gt;&lt;/TD&gt;&lt;TD style="height: 51px;"&gt;&lt;/TD&gt;&lt;TD style="height: 51px;"&gt;&lt;/TD&gt;&lt;TD style="height: 51px;"&gt;&lt;/TD&gt;&lt;TD style="height: 51px;"&gt;&lt;/TD&gt;&lt;TD style="height: 51px;"&gt;23CE0246-08E7-4E60-B6AC-49D9DFCF7F29&lt;/TD&gt;&lt;TD style="height: 51px;"&gt;7/21/2020 11:40&lt;/TD&gt;&lt;TD style="height: 51px;"&gt;dsarver&lt;/TD&gt;&lt;TD style="height: 51px;"&gt;7/21/2020 12:21&lt;/TD&gt;&lt;TD style="height: 51px;"&gt;dsarver&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope what I wrote makes sense, and thanks for reading this &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Aug 2020 20:47:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-workforce-questions/workforce-import-assignments-from-a-csv-script/m-p/804406#M647</guid>
      <dc:creator>DaveSarver1</dc:creator>
      <dc:date>2020-08-18T20:47:44Z</dc:date>
    </item>
    <item>
      <title>Re: Workforce - Import Assignments from a CSV - Script geometry help</title>
      <link>https://community.esri.com/t5/arcgis-workforce-questions/workforce-import-assignments-from-a-csv-script/m-p/804407#M648</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You'll want to change how the geometry is created. In the script this is created from the X,Y, and spatial reference. You can see it here: &lt;A class="link-titled" href="https://github.com/Esri/workforce-scripts/blob/master/scripts/create_assignments_from_csv.py#L135" title="https://github.com/Esri/workforce-scripts/blob/master/scripts/create_assignments_from_csv.py#L135"&gt;workforce-scripts/create_assignments_from_csv.py at master · Esri/workforce-scripts · GitHub&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is un-tested but I think you want to do something like:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;geometry =&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "x": row["x"],&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "y": row["y],&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "spatialReference": {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "wkid": 102100&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Aug 2020 14:13:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-workforce-questions/workforce-import-assignments-from-a-csv-script/m-p/804407#M648</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-08-19T14:13:16Z</dc:date>
    </item>
    <item>
      <title>Re: Workforce - Import Assignments from a CSV - Script geometry help</title>
      <link>https://community.esri.com/t5/arcgis-workforce-questions/workforce-import-assignments-from-a-csv-script/m-p/804408#M649</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That worked! &amp;nbsp;Thank you Aaron!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Aug 2020 15:40:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-workforce-questions/workforce-import-assignments-from-a-csv-script/m-p/804408#M649</guid>
      <dc:creator>DaveSarver1</dc:creator>
      <dc:date>2020-08-19T15:40:11Z</dc:date>
    </item>
    <item>
      <title>Re: Workforce - Import Assignments from a CSV - Script geometry help</title>
      <link>https://community.esri.com/t5/arcgis-workforce-questions/workforce-import-assignments-from-a-csv-script/m-p/1070809#M2054</link>
      <description>&lt;P&gt;How did you solve it, Can you copy your code?, I have tried and I do not solve it. Please&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jun 2021 01:19:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-workforce-questions/workforce-import-assignments-from-a-csv-script/m-p/1070809#M2054</guid>
      <dc:creator>ChristianChacon</dc:creator>
      <dc:date>2021-06-22T01:19:22Z</dc:date>
    </item>
  </channel>
</rss>

