<?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 I need help inserting data into hyperlink in custom popup.  Anyone? in ArcGIS Enterprise Portal Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/i-need-help-inserting-data-into-hyperlink-in/m-p/51696#M640</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;I am having trouble creating a custom popup in ArcGIS Portal.&amp;nbsp; What I want is a hyperlink to an external page that is filled with data from the clicked feature.&amp;nbsp; The hyperlink looks like this: "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fwww.co.richland.nd.us%2FRCIMS%2FParcel.html%3Fparcel%3D" rel="nofollow" target="_blank"&gt;http://www.co.richland.nd.us/RCIMS/Parcel.html?parcel=&lt;/A&gt;&lt;SPAN style="color: #e23d39;"&gt;&lt;STRONG&gt;13-0000-02582.001"&lt;/STRONG&gt;&lt;SPAN style="color: #303030;"&gt; where the bold red part would come from the following data field: &lt;SPAN style="font-size: 10pt; font-family: 'Times New Roman';"&gt;{RICHLAND.DBO.RC_Parcels.PIN_TXT}&lt;/SPAN&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #303030;"&gt;Thanks for any advice you may have.&amp;nbsp; I tried to construct in the HTML mode, but couldn't get it to insert the data correctly into the HTML string.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 May 2016 16:21:26 GMT</pubDate>
    <dc:creator>Syvertson</dc:creator>
    <dc:date>2016-05-17T16:21:26Z</dc:date>
    <item>
      <title>I need help inserting data into hyperlink in custom popup.  Anyone?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/i-need-help-inserting-data-into-hyperlink-in/m-p/51696#M640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;I am having trouble creating a custom popup in ArcGIS Portal.&amp;nbsp; What I want is a hyperlink to an external page that is filled with data from the clicked feature.&amp;nbsp; The hyperlink looks like this: "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fwww.co.richland.nd.us%2FRCIMS%2FParcel.html%3Fparcel%3D" rel="nofollow" target="_blank"&gt;http://www.co.richland.nd.us/RCIMS/Parcel.html?parcel=&lt;/A&gt;&lt;SPAN style="color: #e23d39;"&gt;&lt;STRONG&gt;13-0000-02582.001"&lt;/STRONG&gt;&lt;SPAN style="color: #303030;"&gt; where the bold red part would come from the following data field: &lt;SPAN style="font-size: 10pt; font-family: 'Times New Roman';"&gt;{RICHLAND.DBO.RC_Parcels.PIN_TXT}&lt;/SPAN&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #303030;"&gt;Thanks for any advice you may have.&amp;nbsp; I tried to construct in the HTML mode, but couldn't get it to insert the data correctly into the HTML string.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 May 2016 16:21:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/i-need-help-inserting-data-into-hyperlink-in/m-p/51696#M640</guid>
      <dc:creator>Syvertson</dc:creator>
      <dc:date>2016-05-17T16:21:26Z</dc:date>
    </item>
    <item>
      <title>Re: I need help inserting data into hyperlink in custom popup.  Anyone?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/i-need-help-inserting-data-into-hyperlink-in/m-p/51697#M641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Matthew,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you should mark your text, open the link properties and append the data field in braces, e.g like Parcel ...co.richland.nd.us/RCIMS/Parcel.html?parcel={RICHLAND.DBO.RC_Parcels.PIN_TXT}.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This work fine for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings Karsten&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 May 2016 18:28:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/i-need-help-inserting-data-into-hyperlink-in/m-p/51697#M641</guid>
      <dc:creator>KarstenRank</dc:creator>
      <dc:date>2016-05-17T18:28:40Z</dc:date>
    </item>
    <item>
      <title>Re: I need help inserting data into hyperlink in custom popup.  Anyone?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/i-need-help-inserting-data-into-hyperlink-in/m-p/51698#M642</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="http://desktop.arcgis.com/en/arcmap/10.3/map/working-with-layers/using-hyperlinks.htm" title="http://desktop.arcgis.com/en/arcmap/10.3/map/working-with-layers/using-hyperlinks.htm"&gt;Using Hyperlinks—Help | ArcGIS for Desktop&lt;/A&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try using the hyperlink script option?&lt;/P&gt;&lt;P&gt;Set the parser to Python and see if this code will work for you.&lt;/P&gt;&lt;P&gt;I pulled&amp;nbsp; your parcel ID into tId out of habit (debugging outside the hyperlink)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import webbrowser&lt;/P&gt;&lt;P&gt;def OpenLink ( [RICHLAND.DBO.RC_Parcels.PIN_TXT]):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; tId = [RICHLAND.DBO.RC_Parcels.PIN_TXT]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; parcelId = '' if (tId is None ) else tId.strip('\r\n\t ')&amp;nbsp; # trims CR, NL, TAB or spaces&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; basePath = '&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fwww.co.richland.nd.us%2FRCIMS%2FParcel.html%3Fparcel%3D" rel="nofollow" target="_blank"&gt;http://www.co.richland.nd.us/RCIMS/Parcel.html?parcel=&lt;/A&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if parcelId: # make sure you don't have an empty parcel id &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tPath = basePath + parcelId &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; webbrowser.open(tPath)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or in short form with no attempt at error checking:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import webbrowser&lt;/P&gt;&lt;P&gt;def OpenLink ( [RICHLAND.DBO.RC_Parcels.PIN_TXT]):&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; webbrowser.open('&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fwww.co.richland.nd.us%2FRCIMS%2FParcel.html%3Fparcel%3D%27%2B%5BRICHLAND.DBO.RC_Parcels.PIN_TXT%5D" rel="nofollow" target="_blank"&gt;http://www.co.richland.nd.us/RCIMS/Parcel.html?parcel='+[RICHLAND.DBO.RC_Parcels.PIN_TXT]&lt;/A&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's an example of more complex scripting where we have a flag that indicates if there's an attached image and we have a previous and current project Id.&lt;/P&gt;&lt;P&gt;We want to use current project Id if it exists, otherwise the current prj ID and if neither project ID exists, we have an empty string and we do nothing.&lt;/P&gt;&lt;P&gt;Note that Python treats an empty string as a False&lt;/P&gt;&lt;P&gt;import webbrowser&lt;/P&gt;&lt;P&gt;def OpenLink ( [IR_IMAGE], [CURRENT_PROJECT_NUMBER], [ORIGINAL_PROJECT_NUMBER]&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # need to insert code to check that a project number exists, swap between current and original?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if [IR_IMAGE] ==&amp;nbsp; 'NO' or [IR_IMAGE] ==&amp;nbsp; 'N' :&amp;nbsp; # should show up in here as NO but just in case, check against N&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; cP = [CURRENT_PROJECT_NUMBER]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; oP = [ORIGINAL_PROJECT_NUMBER]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; cPrj = '' if (cP is None ) else cP.strip('\r\n\t ')&amp;nbsp; # trims CR, NL, TAB or spaces&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; oPrj = '' if (oP is None) else oP.strip('\r\n\t ')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #&amp;nbsp; this can give you an empty string for thisProjId (if both current and previous project IDs are empty)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; thisProjId = cPrj if (cPrj) else oPrj&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if thisProjId: # make sure you don't have an empty prj id (either current or original)&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; path = '&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fsrvrname.domain.com%2FDefault.aspx%3FGISProject%3D" rel="nofollow" target="_blank"&gt;http://srvrname.domain.com/Default.aspx?GISProject=&lt;/A&gt;&lt;SPAN&gt;' + thisProjId &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; webbrowser.open(path)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: I have only recent started trying the hyperlink in Layer Properties in an mxd.&lt;/P&gt;&lt;P&gt;My long time habits typically have me doing things like:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; basePath = '&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fsrvrname.domain.com%2FDefault.aspx%3FGISProject%3D" rel="nofollow" target="_blank"&gt;http://srvrname.domain.com/Default.aspx?GISProject=&lt;/A&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; path = basePath + thisProjId&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;In these hyperlink scripts, I'm not sure this buys you anything since you can only debug outside of the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm guessing or assuming that anything in [] is treated as a string regardless of it's type?&lt;/P&gt;&lt;P&gt;Or does it come in as the field type.&amp;nbsp; I'm playing with that now to try to understand it but you really can't get interactive in the script that I'm aware of yet...&lt;/P&gt;&lt;P&gt;Dan?&amp;nbsp; Can I pull in arcpy and use messaging or print to stdout?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 May 2016 18:36:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/i-need-help-inserting-data-into-hyperlink-in/m-p/51698#M642</guid>
      <dc:creator>PaulDavidson1</dc:creator>
      <dc:date>2016-05-17T18:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: I need help inserting data into hyperlink in custom popup.  Anyone?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/i-need-help-inserting-data-into-hyperlink-in/m-p/51699#M643</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Paul,&amp;nbsp; I assume your solution would have worked just fine, but I tried the easy answer first and it worked.&amp;nbsp; Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 May 2016 19:23:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/i-need-help-inserting-data-into-hyperlink-in/m-p/51699#M643</guid>
      <dc:creator>Syvertson</dc:creator>
      <dc:date>2016-05-17T19:23:01Z</dc:date>
    </item>
    <item>
      <title>Re: I need help inserting data into hyperlink in custom popup.  Anyone?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/i-need-help-inserting-data-into-hyperlink-in/m-p/51700#M644</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This worked splendidly.&amp;nbsp; It is just like me to make this harder than it had to be.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 May 2016 19:23:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/i-need-help-inserting-data-into-hyperlink-in/m-p/51700#M644</guid>
      <dc:creator>Syvertson</dc:creator>
      <dc:date>2016-05-17T19:23:34Z</dc:date>
    </item>
    <item>
      <title>Re: I need help inserting data into hyperlink in custom popup.  Anyone?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/i-need-help-inserting-data-into-hyperlink-in/m-p/51701#M645</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Easiest is always best....&lt;/P&gt;&lt;P&gt;I also missed that you were in Portal (even though it's right up front.)&amp;nbsp; My solution is down at the ArcMap mxd level.&lt;/P&gt;&lt;P&gt;Which I am not sure about how it will work when it comes to Portal but it's on my list of things to try.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We've found all sorts of interesting behavior when we go from map services to Feature Services, to hosted Feature Services, etc...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 May 2016 20:04:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/i-need-help-inserting-data-into-hyperlink-in/m-p/51701#M645</guid>
      <dc:creator>PaulDavidson1</dc:creator>
      <dc:date>2016-05-17T20:04:35Z</dc:date>
    </item>
  </channel>
</rss>

