<?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 Using dynamic text or python to lookup username and return a full name in ArcGIS Mapping and Charting Questions</title>
    <link>https://community.esri.com/t5/arcgis-mapping-and-charting-questions/using-dynamic-text-or-python-to-lookup-username/m-p/760635#M2670</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've googled and experimented and continue to fail. All I'm trying to do is display our Full Name in the Map Layout (a text box) but Arcs dynamic text only returns username (ie "usern" instead of "User Name"). Is there any way of writing a lookup list or If/Else logic script for or python code that will allow me to have a Text box display a users full name? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm happy if I need to write a list of users for it to return and will be even happier if it can be done to return someones full name based on windows login or something. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Jun 2016 06:00:45 GMT</pubDate>
    <dc:creator>LindsayRaabe</dc:creator>
    <dc:date>2016-06-02T06:00:45Z</dc:date>
    <item>
      <title>Using dynamic text or python to lookup username and return a full name</title>
      <link>https://community.esri.com/t5/arcgis-mapping-and-charting-questions/using-dynamic-text-or-python-to-lookup-username/m-p/760635#M2670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've googled and experimented and continue to fail. All I'm trying to do is display our Full Name in the Map Layout (a text box) but Arcs dynamic text only returns username (ie "usern" instead of "User Name"). Is there any way of writing a lookup list or If/Else logic script for or python code that will allow me to have a Text box display a users full name? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm happy if I need to write a list of users for it to return and will be even happier if it can be done to return someones full name based on windows login or something. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jun 2016 06:00:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-mapping-and-charting-questions/using-dynamic-text-or-python-to-lookup-username/m-p/760635#M2670</guid>
      <dc:creator>LindsayRaabe</dc:creator>
      <dc:date>2016-06-02T06:00:45Z</dc:date>
    </item>
    <item>
      <title>Re: Using dynamic text or python to lookup username and return a full name</title>
      <link>https://community.esri.com/t5/arcgis-mapping-and-charting-questions/using-dynamic-text-or-python-to-lookup-username/m-p/760636#M2671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you investigated the text box's dynamic text string? &lt;/P&gt;&lt;P&gt;It should be&amp;nbsp; &lt;STRONG&gt;User Name: &amp;lt;dyn type="user"/&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;And with Python you can get the Windows username like this:&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="_jivemacro_uid_14648481042668950 jive_macro_code jive_text_macro" data-renderedposition="86_8_1315_16" jivemacro_uid="_14648481042668950"&gt;&lt;SPAN style="color: #242729; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; font-size: 13px; background-color: #eff0f1;"&gt;os.getenv('username')&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jun 2016 06:07:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-mapping-and-charting-questions/using-dynamic-text-or-python-to-lookup-username/m-p/760636#M2671</guid>
      <dc:creator>FC_Basson</dc:creator>
      <dc:date>2016-06-02T06:07:20Z</dc:date>
    </item>
    <item>
      <title>Re: Using dynamic text or python to lookup username and return a full name</title>
      <link>https://community.esri.com/t5/arcgis-mapping-and-charting-questions/using-dynamic-text-or-python-to-lookup-username/m-p/760637#M2672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This isn't quite what I'm looking for. The username doesn't come in formatted correctly (for instance a user name is "johnd" but I want to display "John Doe") Can this be done using either the python dictionary sort of setup or by reading the dynamic text field? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, when I tried your python script, it just returned the script as text. &lt;IMG alt="Text Box.JPG" class="image-1 jive-image" src="/legacyfs/online/206594_Text Box.JPG" style="width: 620px; height: 327px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jun 2016 06:29:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-mapping-and-charting-questions/using-dynamic-text-or-python-to-lookup-username/m-p/760637#M2672</guid>
      <dc:creator>LindsayRaabe</dc:creator>
      <dc:date>2016-06-02T06:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: Using dynamic text or python to lookup username and return a full name</title>
      <link>https://community.esri.com/t5/arcgis-mapping-and-charting-questions/using-dynamic-text-or-python-to-lookup-username/m-p/760638#M2673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, you're results are as expexted.&amp;nbsp; The Python code can't go in the dynamic text.&amp;nbsp; You will need to run it seperately or as a tool.&amp;nbsp; You can look at &lt;A href="http://http//stackoverflow.com/questions/21766954/how-to-get-windows-users-full-name-in-python"&gt;this post&lt;/A&gt; at StackOverflow that works for getting the full username.&amp;nbsp; It works well, so maybe you can run the code and write the username to the text box at startup if you are using a fixed layout template by creating a Add-in that runs at startup (&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//014p00000018000000" title="http://resources.arcgis.com/en/help/main/10.1/index.html#//014p00000018000000"&gt;ArcGIS Help 10.1&lt;/A&gt;).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jun 2016 06:49:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-mapping-and-charting-questions/using-dynamic-text-or-python-to-lookup-username/m-p/760638#M2673</guid>
      <dc:creator>FC_Basson</dc:creator>
      <dc:date>2016-06-02T06:49:42Z</dc:date>
    </item>
    <item>
      <title>Re: Using dynamic text or python to lookup username and return a full name</title>
      <link>https://community.esri.com/t5/arcgis-mapping-and-charting-questions/using-dynamic-text-or-python-to-lookup-username/m-p/760639#M2674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found that page during my googles. What do you mean by run it separately or as a tool? Is there another way of displaying information (text, lists, etc) in Layout View besides as a Live Legend, Image or Text Element?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jun 2016 07:06:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-mapping-and-charting-questions/using-dynamic-text-or-python-to-lookup-username/m-p/760639#M2674</guid>
      <dc:creator>LindsayRaabe</dc:creator>
      <dc:date>2016-06-02T07:06:30Z</dc:date>
    </item>
    <item>
      <title>Re: Using dynamic text or python to lookup username and return a full name</title>
      <link>https://community.esri.com/t5/arcgis-mapping-and-charting-questions/using-dynamic-text-or-python-to-lookup-username/m-p/760640#M2675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think there is any other way of adding the text to your layout.&amp;nbsp; You can let the user run a script tool from the toolbox to set the dynamic text of an layout element.&amp;nbsp; For this you must create a Python scipt and add it to your ArcToolbox (&lt;A href="http://desktop.arcgis.com/en/arcmap/10.3/analyze/creating-tools/adding-a-script-tool.htm" title="http://desktop.arcgis.com/en/arcmap/10.3/analyze/creating-tools/adding-a-script-tool.htm"&gt;Adding a script tool—Help | ArcGIS for Desktop&lt;/A&gt; ), which the user can just run, but that is still too manual and defies the purpose of dynamic text.&amp;nbsp;&amp;nbsp; The other option is an Add-in that runs at startup.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jun 2016 07:15:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-mapping-and-charting-questions/using-dynamic-text-or-python-to-lookup-username/m-p/760640#M2675</guid>
      <dc:creator>FC_Basson</dc:creator>
      <dc:date>2016-06-02T07:15:47Z</dc:date>
    </item>
    <item>
      <title>Re: Using dynamic text or python to lookup username and return a full name</title>
      <link>https://community.esri.com/t5/arcgis-mapping-and-charting-questions/using-dynamic-text-or-python-to-lookup-username/m-p/760641#M2676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could create a dictionary and return the names. And a text element it would be a little extra work to keep up the list and either run the script or create an Addin&lt;/P&gt;&lt;P&gt;&lt;A href="http://desktop.arcgis.com/en/arcmap/10.3/analyze/arcpy-mapping/textelement-class.htm" title="http://desktop.arcgis.com/en/arcmap/10.3/analyze/arcpy-mapping/textelement-class.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;TextElement—Help | ArcGIS for Desktop&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;users= {'uname':'User Name','oname':'Other Name','yName':'Use Your Name'}
users[os.getenv('username')]&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 08:18:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-mapping-and-charting-questions/using-dynamic-text-or-python-to-lookup-username/m-p/760641#M2676</guid>
      <dc:creator>WesMiller</dc:creator>
      <dc:date>2021-12-12T08:18:44Z</dc:date>
    </item>
  </channel>
</rss>

