<?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 Query Widget Popup Config and Expressions in ArcGIS Web AppBuilder Questions</title>
    <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/query-widget-popup-config-and-expressions/m-p/1344115#M23261</link>
    <description>&lt;P&gt;I have a pretty loaded question....&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a webmap that has a custom popup with a couple expressions.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If there is a related record in a FC then the Update Expression Link is displayed&lt;/P&gt;&lt;P&gt;If there is NO related record in a FC then the Add Expression link is displayed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;&amp;lt;div style="display:{expression/expr0};"&amp;gt;&amp;lt;a href="arcgis-survey123://?itemID=4ebxxfd0f0xx284304e518&amp;amp;amp;portalUrl=https://xxx.gov/portalx&amp;amp;amp;action=edit&amp;amp;amp;folder=inbox&amp;amp;amp;update=true&amp;amp;amp;filter=REL_GLOBALID:{GLOBALID}&amp;amp;amp;callback=arcgis-fieldmaps://?itemID=7b9ba6cedxxx6e8dc5cec1d65" rel="nofollow ugc" target="_blank"&amp;gt;Update OA-13 Inspection Form&amp;lt;/a&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;div style="display:{expression/expr1};"&amp;gt;&amp;lt;a href="arcgis-survey123://?itemID=4ebfdffxxx279284304e518&amp;amp;amp;field:REL_GLOBALID={GLOBALID}&amp;amp;amp;field:GEOGRAPHICAL_LOCATION={LATITUDE},{LONGITUDE}&amp;amp;amp;callback=arcgis-fieldmaps://?itemID=7b9ba6ced6bxxxdc5cec1d65" rel="nofollow ugc" target="_blank"&amp;gt;Add OA-13 Inspection Form&amp;lt;/a&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Update Expression:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;// THIS SHOWS THE LINK IF THERE IS AN EXISTING RECORD
var globalIDValue = $feature.GLOBALID
var relGlobalIDValue = FeatureSetByName($map,"Update - OA 13 Inspection Form",['REL_GLOBALID'], false)
var status = "none"
for (var i in relGlobalIDValue) {
    var compareValue = Text(i.REL_GLOBALID)
    var currentValue = globalIDValue
    if (currentValue == compareValue){  
        status = "inline"
        }
}
return status&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Add Expression&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var globalIDValue = $feature.GLOBALID
var relGlobalIDValue = FeatureSetByName($map,"Add OA 13 Inspection Form",['REL_GLOBALID'], false)
//var status = "NO INSPECTION"
var status = "inline"
for (var i in relGlobalIDValue) {
    var compareValue = Text(i.REL_GLOBALID)
    var currentValue = globalIDValue
    if (currentValue == compareValue){  
        status = "none"
        }
}
return status&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This works GREAT and can be clearly seen in the Popup below... where only one of them is shown at a time...In this case there is a related record for this Feature and as such it says Update for the second link "Update OA-13 Inspection Form"&lt;/P&gt;&lt;P&gt;If there was NOT a related record it would say "Add OA-13 Inspection Record"&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kapalczynski_0-1698781433018.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/84613iE3C680FDBC91735F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kapalczynski_0-1698781433018.png" alt="kapalczynski_0-1698781433018.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;So everything is working Fantastic up to this point... But I then create a Web application and then add the Query Widget.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;=============================================&lt;/P&gt;&lt;P&gt;I configure the Query widget to "&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Use layer's pop-up configuration in the web map"&lt;/P&gt;&lt;P&gt;Is does this to a certain degree BUT the Expression is not read properly and ALWAYS displays &lt;STRONG&gt;BOTH&lt;/STRONG&gt; of the links created via expressions..(See 2nd image below)&lt;/P&gt;&lt;P&gt;No matter what I do I cannot get the QUERY WIDGET to respect the Expressions in the WebMap Custom Config as specified int he Query Widget Config Settings.&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;&lt;STRONG&gt;THOUGHTS?&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kapalczynski_1-1698781595447.png" style="width: 641px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/84614i8D3C80E4CE00BD56/image-dimensions/641x507?v=v2" width="641" height="507" role="button" title="kapalczynski_1-1698781595447.png" alt="kapalczynski_1-1698781595447.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kapalczynski_3-1698781761796.png" style="width: 644px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/84616iC6027F2337AC2D3E/image-dimensions/644x359?v=v2" width="644" height="359" role="button" title="kapalczynski_3-1698781761796.png" alt="kapalczynski_3-1698781761796.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 31 Oct 2023 19:53:55 GMT</pubDate>
    <dc:creator>kapalczynski</dc:creator>
    <dc:date>2023-10-31T19:53:55Z</dc:date>
    <item>
      <title>Query Widget Popup Config and Expressions</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/query-widget-popup-config-and-expressions/m-p/1344115#M23261</link>
      <description>&lt;P&gt;I have a pretty loaded question....&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a webmap that has a custom popup with a couple expressions.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If there is a related record in a FC then the Update Expression Link is displayed&lt;/P&gt;&lt;P&gt;If there is NO related record in a FC then the Add Expression link is displayed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;&amp;lt;div style="display:{expression/expr0};"&amp;gt;&amp;lt;a href="arcgis-survey123://?itemID=4ebxxfd0f0xx284304e518&amp;amp;amp;portalUrl=https://xxx.gov/portalx&amp;amp;amp;action=edit&amp;amp;amp;folder=inbox&amp;amp;amp;update=true&amp;amp;amp;filter=REL_GLOBALID:{GLOBALID}&amp;amp;amp;callback=arcgis-fieldmaps://?itemID=7b9ba6cedxxx6e8dc5cec1d65" rel="nofollow ugc" target="_blank"&amp;gt;Update OA-13 Inspection Form&amp;lt;/a&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;div style="display:{expression/expr1};"&amp;gt;&amp;lt;a href="arcgis-survey123://?itemID=4ebfdffxxx279284304e518&amp;amp;amp;field:REL_GLOBALID={GLOBALID}&amp;amp;amp;field:GEOGRAPHICAL_LOCATION={LATITUDE},{LONGITUDE}&amp;amp;amp;callback=arcgis-fieldmaps://?itemID=7b9ba6ced6bxxxdc5cec1d65" rel="nofollow ugc" target="_blank"&amp;gt;Add OA-13 Inspection Form&amp;lt;/a&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Update Expression:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;// THIS SHOWS THE LINK IF THERE IS AN EXISTING RECORD
var globalIDValue = $feature.GLOBALID
var relGlobalIDValue = FeatureSetByName($map,"Update - OA 13 Inspection Form",['REL_GLOBALID'], false)
var status = "none"
for (var i in relGlobalIDValue) {
    var compareValue = Text(i.REL_GLOBALID)
    var currentValue = globalIDValue
    if (currentValue == compareValue){  
        status = "inline"
        }
}
return status&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Add Expression&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var globalIDValue = $feature.GLOBALID
var relGlobalIDValue = FeatureSetByName($map,"Add OA 13 Inspection Form",['REL_GLOBALID'], false)
//var status = "NO INSPECTION"
var status = "inline"
for (var i in relGlobalIDValue) {
    var compareValue = Text(i.REL_GLOBALID)
    var currentValue = globalIDValue
    if (currentValue == compareValue){  
        status = "none"
        }
}
return status&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This works GREAT and can be clearly seen in the Popup below... where only one of them is shown at a time...In this case there is a related record for this Feature and as such it says Update for the second link "Update OA-13 Inspection Form"&lt;/P&gt;&lt;P&gt;If there was NOT a related record it would say "Add OA-13 Inspection Record"&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kapalczynski_0-1698781433018.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/84613iE3C680FDBC91735F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kapalczynski_0-1698781433018.png" alt="kapalczynski_0-1698781433018.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;So everything is working Fantastic up to this point... But I then create a Web application and then add the Query Widget.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;=============================================&lt;/P&gt;&lt;P&gt;I configure the Query widget to "&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Use layer's pop-up configuration in the web map"&lt;/P&gt;&lt;P&gt;Is does this to a certain degree BUT the Expression is not read properly and ALWAYS displays &lt;STRONG&gt;BOTH&lt;/STRONG&gt; of the links created via expressions..(See 2nd image below)&lt;/P&gt;&lt;P&gt;No matter what I do I cannot get the QUERY WIDGET to respect the Expressions in the WebMap Custom Config as specified int he Query Widget Config Settings.&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;&lt;STRONG&gt;THOUGHTS?&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kapalczynski_1-1698781595447.png" style="width: 641px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/84614i8D3C80E4CE00BD56/image-dimensions/641x507?v=v2" width="641" height="507" role="button" title="kapalczynski_1-1698781595447.png" alt="kapalczynski_1-1698781595447.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kapalczynski_3-1698781761796.png" style="width: 644px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/84616iC6027F2337AC2D3E/image-dimensions/644x359?v=v2" width="644" height="359" role="button" title="kapalczynski_3-1698781761796.png" alt="kapalczynski_3-1698781761796.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2023 19:53:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/query-widget-popup-config-and-expressions/m-p/1344115#M23261</guid>
      <dc:creator>kapalczynski</dc:creator>
      <dc:date>2023-10-31T19:53:55Z</dc:date>
    </item>
    <item>
      <title>Re: Query Widget Popup Config and Expressions</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/query-widget-popup-config-and-expressions/m-p/1344886#M23264</link>
      <description>&lt;P&gt;Maybe something I have to get with ESRI about?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2023 12:05:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/query-widget-popup-config-and-expressions/m-p/1344886#M23264</guid>
      <dc:creator>kapalczynski</dc:creator>
      <dc:date>2023-11-02T12:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: Query Widget Popup Config and Expressions</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/query-widget-popup-config-and-expressions/m-p/1347702#M23279</link>
      <description>&lt;P&gt;FROM ESRI SUPPORT:&lt;/P&gt;&lt;P&gt;I appreciate you sharing the post and providing an excellent details! I understood you have a custom expression which works as expected in Map Viewer but when you create a web app builder using this map, the query widget in web app builder is not honoring this expression.&lt;/P&gt;&lt;P&gt;I went ahead and did some research and found that pop-up configurations made in ArcGIS Online Map Viewer&amp;nbsp;&lt;A href="https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsupport.esri.com%2Fen-us%2Fknowledge-base%2Fproblem-popups-configured-in-arcgis-online-map-viewer-a-000026323&amp;amp;data=05%7C01%7Cjason.kapalczynski%40vdot.virginia.gov%7C7f1271018d974847530108dbe12d3694%7C620ae5a94ec14fa086415d9f386c7309%7C1%7C0%7C638351356525474448%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;amp;sdata=UDdehFMcSzbtFRJPAC8UEpaJHUywxt8YzIZ%2FUuaCOyg%3D&amp;amp;reserved=0" target="_blank"&gt;are not compatible&lt;/A&gt; with ArcGIS Web AppBuilder. Furthermore, unfortunately, the behavior you are experiencing, looking at your post, seems to be a BUG-000108767: "The Web AppBuilder for ArcGIS Query widget's pop-up does not honor the pop-up configuration of the related table assigned in the ArcGIS Online web map". I can go ahead and attach this bug to our case and you can monitor the status of this bug.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Nov 2023 14:34:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/query-widget-popup-config-and-expressions/m-p/1347702#M23279</guid>
      <dc:creator>kapalczynski</dc:creator>
      <dc:date>2023-11-09T14:34:43Z</dc:date>
    </item>
  </channel>
</rss>

