<?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 Condition When Hyperlink File Does Not Exist for Feature in WebApp in ArcGIS Viewer for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/condition-when-hyperlink-file-does-not-exist-for/m-p/545572#M15410</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In a FlexViewer app I currently have a hyperlink to a file with an Identify pop-up window. This link works for every feature in a mapservice because each feature has an associated file.&amp;nbsp; Now I have another feature that only has links for certain features.&amp;nbsp; If the enduser would click on a feature without an associated link I get a 404 - File or directory not found error.&amp;nbsp; Do the Identify popups allow conditional statements in the xml file that would test for the existence of a linked file so the user could be informed in a more user friendly way that there is no associated feature for the selected feature? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 May 2015 19:03:03 GMT</pubDate>
    <dc:creator>MichaelVolz</dc:creator>
    <dc:date>2015-05-12T19:03:03Z</dc:date>
    <item>
      <title>Condition When Hyperlink File Does Not Exist for Feature in WebApp</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/condition-when-hyperlink-file-does-not-exist-for/m-p/545572#M15410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In a FlexViewer app I currently have a hyperlink to a file with an Identify pop-up window. This link works for every feature in a mapservice because each feature has an associated file.&amp;nbsp; Now I have another feature that only has links for certain features.&amp;nbsp; If the enduser would click on a feature without an associated link I get a 404 - File or directory not found error.&amp;nbsp; Do the Identify popups allow conditional statements in the xml file that would test for the existence of a linked file so the user could be informed in a more user friendly way that there is no associated feature for the selected feature? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 May 2015 19:03:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/condition-when-hyperlink-file-does-not-exist-for/m-p/545572#M15410</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2015-05-12T19:03:03Z</dc:date>
    </item>
    <item>
      <title>Re: Condition When Hyperlink File Does Not Exist for Feature in WebApp</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/condition-when-hyperlink-file-does-not-exist-for/m-p/545573#M15411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Sure I think the answer to this question is in this thread:&amp;nbsp; &lt;A href="https://community.esri.com/thread/60136"&gt;Popup 3.0 - hide field if value=null&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 May 2015 21:05:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/condition-when-hyperlink-file-does-not-exist-for/m-p/545573#M15411</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2015-05-12T21:05:53Z</dc:date>
    </item>
    <item>
      <title>Re: Condition When Hyperlink File Does Not Exist for Feature in WebApp</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/condition-when-hyperlink-file-does-not-exist-for/m-p/545574#M15412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Of course, this means changing the source and re-compiling.&amp;nbsp; If you have this ability, this is one way I have handled that in the past.&lt;/P&gt;&lt;P&gt;Assuming my hyperlinks are to a photo and works great if there is a valid filename in there.&amp;nbsp; However, if there is no value in there, would throw an error, so in my popuprendererskin, I have added something similar to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (fieldInfo.fieldName == "PHOTO"){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(formattedAttributes[fieldInfo.fieldName] == " "){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; formattedAttributes[fieldInfo.fieldName] = "PlaceHolderFilename.jpg";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This way, if the field is "PHOTO" and the value is blank/null, it will replace the value with "PlaceHolderFilename.jpg".&amp;nbsp; then, in the folder with the other images, there is a jpeg named PlaceHolderFilename.jpg which says "No Photo Available".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, if it has a valid link, the popup will show it, if not, will show a link to this "No Photo Available" document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;R_&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 23:36:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/condition-when-hyperlink-file-does-not-exist-for/m-p/545574#M15412</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2021-12-11T23:36:31Z</dc:date>
    </item>
  </channel>
</rss>

