<?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: Route &amp;quot;Name&amp;quot; field in ArcGIS Network Analyst Questions</title>
    <link>https://community.esri.com/t5/arcgis-network-analyst-questions/route-quot-name-quot-field/m-p/587808#M5647</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That code looks like it should work, in theory.&amp;nbsp; Is your &lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;"PRMT_ID" field a string field?&amp;nbsp; I'm actually not sure how the field mapping would behave if you mapped a field to Name that was, say, an integer.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 26 Mar 2016 20:40:19 GMT</pubDate>
    <dc:creator>MelindaMorang</dc:creator>
    <dc:date>2016-03-26T20:40:19Z</dc:date>
    <item>
      <title>Route "Name" field</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/route-quot-name-quot-field/m-p/587807#M5646</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All, &lt;/P&gt;&lt;P&gt;I am trying to Solve best routes between each OD (origin-destination) pair. I want&amp;nbsp; the route "Name" field to be populated by the value in the field "PRMT_ID" of the origins. PRMT_ID field is in the destination point feature also.I am using python code as below: The route solution works fine, except that the "Name" field of the route only says Location 1-Location 2. It doesn't populate it with the value in the "PRMT_ID" field as I was expecting. I wonder if anyone can advise on how to make the route layer show the "PRMT_ID" value instead of saying generic Location 1-Location 2&lt;/P&gt;&lt;P&gt;Appreciate any help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wrote the code referring to the MakeRouteLayer example 4. &lt;/P&gt;&lt;P&gt;and below are a few lines&lt;/P&gt;&lt;P&gt;&lt;A href="http://desktop.arcgis.com/en/arcmap/10.3/tools/network-analyst-toolbox/make-route-layer.htm" title="http://desktop.arcgis.com/en/arcmap/10.3/tools/network-analyst-toolbox/make-route-layer.htm"&gt;Make Route Layer—Help | ArcGIS for Desktop&lt;/A&gt; &lt;/P&gt;&lt;P&gt;(ArcGIS 10.3.1)&lt;/P&gt;&lt;P&gt;fieldMappings = arcpy.na.NAClassFieldMappings(outNALayer, stopsLayerName)&lt;/P&gt;&lt;P&gt;fieldMappings["Name"].mappedFieldName = "PRMT_ID"&lt;/P&gt;&lt;P&gt;arcpy.na.AddLocations(outNALayer, stopsLayerName, inOrigins, fieldMappings,"")&lt;/P&gt;&lt;P&gt;arcpy.na.AddLocations(outNALayer, stopsLayerName, inDestinations, fieldMappings,"")&lt;/P&gt;&lt;P&gt;arcpy.na.Solve(outNALayer)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Mar 2016 02:47:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/route-quot-name-quot-field/m-p/587807#M5646</guid>
      <dc:creator>ElsitMandal</dc:creator>
      <dc:date>2016-03-26T02:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: Route "Name" field</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/route-quot-name-quot-field/m-p/587808#M5647</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That code looks like it should work, in theory.&amp;nbsp; Is your &lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;"PRMT_ID" field a string field?&amp;nbsp; I'm actually not sure how the field mapping would behave if you mapped a field to Name that was, say, an integer.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Mar 2016 20:40:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/route-quot-name-quot-field/m-p/587808#M5647</guid>
      <dc:creator>MelindaMorang</dc:creator>
      <dc:date>2016-03-26T20:40:19Z</dc:date>
    </item>
    <item>
      <title>Re: Route "Name" field</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/route-quot-name-quot-field/m-p/587809#M5648</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried both ways..it was a long integer type, initially. Then I also tried it with text field, but still did not work. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Mar 2016 21:03:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/route-quot-name-quot-field/m-p/587809#M5648</guid>
      <dc:creator>ElsitMandal</dc:creator>
      <dc:date>2016-03-26T21:03:18Z</dc:date>
    </item>
    <item>
      <title>Re: Route "Name" field</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/route-quot-name-quot-field/m-p/587810#M5649</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in the example code field mappings, example 4&amp;nbsp; has used "RouteName", while example 3 show it as "Name". It my Route layer output the field name was "Name". The code didn't show any error whether I used "RouteName" or "Name"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MakeRouteLayer example 4 (workflow)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;........................................&lt;/P&gt;&lt;P&gt;fieldMappings = arcpy.na.NAClassFieldMappings(outNALayer, stopsLayerName)&lt;/P&gt;&lt;P&gt;fieldMappings["RouteName"].mappedFieldName = "Commuter_Name"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MakeRouteLayer example 3 (workflow)&lt;/P&gt;&lt;P&gt;..................&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fieldMappings = arcpy.na.NAClassFieldMappings(outNALayer, stopsLayerName)&lt;/P&gt;&lt;P&gt;fieldMappings["Name"].mappedFieldName = "Address"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Mar 2016 21:15:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/route-quot-name-quot-field/m-p/587810#M5649</guid>
      <dc:creator>ElsitMandal</dc:creator>
      <dc:date>2016-03-26T21:15:48Z</dc:date>
    </item>
    <item>
      <title>Re: Route "Name" field</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/route-quot-name-quot-field/m-p/587811#M5650</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not sure it would show an error, it may just ignore it completely, try it manually and see what happens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Mar 2016 21:39:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/route-quot-name-quot-field/m-p/587811#M5650</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-03-26T21:39:52Z</dc:date>
    </item>
    <item>
      <title>Re: Route "Name" field</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/route-quot-name-quot-field/m-p/587812#M5651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;as you suggested,I executed the code manually within arcmap python window. As before, the Stops layer name field shows the 2 locations as Location1, Location2 and the Routes layer show Name as Location1-Location2.&lt;/P&gt;&lt;P&gt;If fieldmapping worked correctly, I would assume, the Stops layer also should have shown its Name field value as&amp;nbsp; the mappedFieldName "PRMT_ID" and in Routes layer.&lt;/P&gt;&lt;P&gt;(I know it had worked as expected when I was using model builder tool for route solve a few months ago, but when it used as python code it did not)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/193171_pastedImage_1.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Mar 2016 23:00:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/route-quot-name-quot-field/m-p/587812#M5651</guid>
      <dc:creator>ElsitMandal</dc:creator>
      <dc:date>2016-03-26T23:00:13Z</dc:date>
    </item>
    <item>
      <title>Re: Route "Name" field</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/route-quot-name-quot-field/m-p/587813#M5652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah, okay.&amp;nbsp; Let me first clear up one point of confusion:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to model multiple routes (one route between each origin and destination) in your Route layer, the correct field to map your ID to in the Stops sublayer is the RouteName field.&amp;nbsp; Stops with the same RouteName value end up in the same route.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The "Name" in the Stops sublayer field just the name of each stop.&amp;nbsp; In the Routes sublayer, the route's Name field is just a concatenation of the stop names, unless you specified a RouteName in Stops.&amp;nbsp; Yeah, a little confusing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I still don't know why your code isn't working, but you can try using the old-fashioned string method instead of using NAClassFieldMappings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fieldMappings = "RouteName PRMT_ID #;"&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;arcpy.na.AddLocations(outNALayer, stopsLayerName, inOrigins, fieldMappings,"")&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Mar 2016 23:36:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/route-quot-name-quot-field/m-p/587813#M5652</guid>
      <dc:creator>MelindaMorang</dc:creator>
      <dc:date>2016-03-26T23:36:01Z</dc:date>
    </item>
    <item>
      <title>Re: Route "Name" field</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/route-quot-name-quot-field/m-p/587814#M5653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Melinda!&amp;nbsp; Your explanation about when to use "RouteName"&amp;nbsp;&amp;nbsp; (or when not use "Name") helped me a long way..&lt;/P&gt;&lt;P&gt;Now I understand what was wrong within my code. I had used cursors to get the geometry of the OD pairs and used it as Stops as I needed to treat each OD pair differently depending on their specific attributes. Now when I changed the code to use the stops featureclass itself, the RouteLayer attributes populated with RouteName field as expected&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 27 Mar 2016 03:38:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/route-quot-name-quot-field/m-p/587814#M5653</guid>
      <dc:creator>ElsitMandal</dc:creator>
      <dc:date>2016-03-27T03:38:07Z</dc:date>
    </item>
    <item>
      <title>Re: Route "Name" field</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/route-quot-name-quot-field/m-p/1275550#M8271</link>
      <description>&lt;P&gt;Hello Elsit and anyone else reading this thread who might be doing similar workflows.&lt;/P&gt;&lt;P&gt;Esri’s Network Analyst Team is doing some research about customer workflows involving solving routes or calculating travel times and distances between known or preassigned pairs of origins and destinations.&amp;nbsp; We’d like to better understand our customers’ needs in this area and may use this information to design and develop improved tools and workflows.&lt;/P&gt;&lt;P&gt;I know this post is &lt;EM&gt;very&lt;/EM&gt; old,&amp;nbsp;but if this workflow is still relevant to you and if you have a few minutes and are willing, could you please fill out the attached survey and return it to the e-mail address included inside the document?&amp;nbsp; Alternatively, you can reach out to me (my e-mail address is in the document) to set up a meeting.&lt;/P&gt;&lt;P&gt;Thank you so much!!&lt;/P&gt;</description>
      <pubDate>Tue, 04 Apr 2023 21:49:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/route-quot-name-quot-field/m-p/1275550#M8271</guid>
      <dc:creator>MelindaMorang</dc:creator>
      <dc:date>2023-04-04T21:49:44Z</dc:date>
    </item>
    <item>
      <title>Re: Route "Name" field</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/route-quot-name-quot-field/m-p/1680855#M9214</link>
      <description>&lt;P&gt;I've data of travel behavior with their home as origin and work places as destinations of people along the BRT lane corridor in Dar es salaam survey data, now what i want from it is to map routes between Origin and destination of their travel from it the distance should also computed. the route should show&amp;nbsp; the puporse and transit mode maybe by color or any categorization factor. Infact its a one to one fucntion route. just origin to destion per each person&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jan 2026 17:54:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/route-quot-name-quot-field/m-p/1680855#M9214</guid>
      <dc:creator>VICTORPAUL</dc:creator>
      <dc:date>2026-01-29T17:54:44Z</dc:date>
    </item>
    <item>
      <title>Re: Route "Name" field</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/route-quot-name-quot-field/m-p/1681489#M9216</link>
      <description>&lt;P&gt;Here is a blog post explaining the best way to do this:&amp;nbsp;&lt;A href="https://www.esri.com/arcgis-blog/products/network-analyst/transportation/paired-origins-and-destinations" target="_blank"&gt;https://www.esri.com/arcgis-blog/products/network-analyst/transportation/paired-origins-and-destinations&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Feb 2026 15:46:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/route-quot-name-quot-field/m-p/1681489#M9216</guid>
      <dc:creator>MelindaMorang</dc:creator>
      <dc:date>2026-02-02T15:46:25Z</dc:date>
    </item>
  </channel>
</rss>

