<?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: Returning attributes from a FeatureSet where string values match in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/returning-attributes-from-a-featureset-where/m-p/1382161#M57477</link>
    <description>&lt;P&gt;There's not really a lot of options via arcade for that. If you enable search on your polling place you could use the find parameter to add a URL to the summary window, but that basically opens the same map at the same place in a new tab with the polling place selected, which feels redundant. If its a good enough work around, just append&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;amp;find=856 &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;or whatever the polling place precinct number is.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 14 Feb 2024 13:44:32 GMT</pubDate>
    <dc:creator>JohnEvans6</dc:creator>
    <dc:date>2024-02-14T13:44:32Z</dc:date>
    <item>
      <title>Returning attributes from a FeatureSet where string values match</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/returning-attributes-from-a-featureset-where/m-p/1381179#M57425</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I've been trying to find a solution for a voting location tool for a local municipality. I understand that ESRI has something in place for a similar set up, but I am a bit confused if I can achieve something a little more elaborate with the data I got. Ideally, I'd like to set up an app where a resident can either:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; (1) Type their address and a voting precinct/voting location gets selected and popup is shown (Not sure if&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this is going to work).&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; (2) Click or type a precinct and a popup showing the respective voting location to that precinct shows up.&lt;/P&gt;&lt;P&gt;Would an instant app give me the capabilities for it, or would it require an Experience Builder approach?&lt;/P&gt;&lt;P&gt;The data I am working with entails two FeatureSets. One is polygon feature showing voting precincts, and the second is a point feature for the actual voting locations.&amp;nbsp;&lt;SPAN&gt;These voting locations aren't always located inside the voting precinct that they represent - so doing a spatial intersect, or zone lookup wouldn't work. Also, some voting locations are used for more than one precinct.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Both features have a &lt;EM&gt;PRECINCTCODE&lt;/EM&gt; column. The only difference is that the voting precinct has only one value per line, while the location has multiple values separated by a comma, as shown below.&lt;/P&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;Voting Location:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;OBJECTID PRECINCTCODE&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="62.9531px" height="25px"&gt;&lt;SPAN class=""&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="150.297px" height="25px"&gt;&lt;SPAN class=""&gt;"2011"&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="62.9531px" height="25px"&gt;&lt;SPAN class=""&gt;2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="150.297px" height="25px"&gt;&lt;SPAN class=""&gt;"2022, 2024"&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="62.9531px" height="25px"&gt;&lt;SPAN class=""&gt;3&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="150.297px" height="25px"&gt;&lt;SPAN class=""&gt;"2002, 2023, 2026"&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="62.9531px" height="25px"&gt;&lt;SPAN class=""&gt;4&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="150.297px" height="25px"&gt;&lt;SPAN class=""&gt;"2012, 2020"&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="62.9531px" height="25px"&gt;&lt;SPAN class=""&gt;5&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="150.297px" height="25px"&gt;&lt;SPAN class=""&gt;"2001"&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="62.9531px" height="25px"&gt;&lt;SPAN class=""&gt;6&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="150.297px" height="25px"&gt;&lt;SPAN class=""&gt;"2007"&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="62.9531px" height="25px"&gt;&lt;SPAN class=""&gt;7&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="150.297px" height="25px"&gt;&lt;SPAN class=""&gt;"2017"&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="62.9531px" height="25px"&gt;&lt;SPAN class=""&gt;9&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="150.297px" height="25px"&gt;&lt;SPAN class=""&gt;"2003"&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="62.9531px" height="25px"&gt;&lt;SPAN class=""&gt;10&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="150.297px" height="25px"&gt;&lt;SPAN class=""&gt;"2004, 2008"&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="62.9531px" height="25px"&gt;&lt;SPAN class=""&gt;11&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="150.297px" height="25px"&gt;&lt;SPAN class=""&gt;"2005, 2025"&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="62.9531px" height="25px"&gt;&lt;SPAN class=""&gt;12&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="150.297px" height="25px"&gt;&lt;SPAN class=""&gt;"2018"&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="62.9531px" height="25px"&gt;&lt;SPAN class=""&gt;13&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="150.297px" height="25px"&gt;&lt;SPAN class=""&gt;"2010, 2013, 2016"&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="62.9531px" height="25px"&gt;&lt;SPAN class=""&gt;14&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="150.297px" height="25px"&gt;&lt;SPAN class=""&gt;"2009, 2019"&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="62.9531px" height="25px"&gt;&lt;SPAN class=""&gt;15&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="150.297px" height="25px"&gt;&lt;SPAN class=""&gt;"2021"&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="62.9531px" height="25px"&gt;&lt;SPAN class=""&gt;16&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="150.297px" height="25px"&gt;&lt;SPAN class=""&gt;"2015"&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="62.9531px" height="25px"&gt;&lt;SPAN class=""&gt;17&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="150.297px" height="25px"&gt;&lt;SPAN class=""&gt;"2014"&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="62.9531px" height="25px"&gt;&lt;SPAN class=""&gt;18&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="150.297px" height="25px"&gt;&lt;SPAN class=""&gt;"2006"&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did find this post that I believe points me in the right direction (see below). But I'm getting stuck on querying the string data and using perhaps a Split function(?), in order to look at these precinct code values separately.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/nonprofit-program-questions/how-do-you-reference-another-field-from-a-related/td-p/5094" target="_blank" rel="noopener"&gt;How do you reference another field from a related ... - Esri Community&lt;/A&gt;&lt;/P&gt;&lt;P&gt;This is probably a very simple task, but my limited knowledge of arcade has been setting me back for a while. I apologize if this issue has previously been addressed in a different post already.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Caio&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2024 17:57:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/returning-attributes-from-a-featureset-where/m-p/1381179#M57425</guid>
      <dc:creator>Ferreira</dc:creator>
      <dc:date>2024-02-12T17:57:08Z</dc:date>
    </item>
    <item>
      <title>Re: Returning attributes from a FeatureSet where string values match</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/returning-attributes-from-a-featureset-where/m-p/1381762#M57456</link>
      <description>&lt;P&gt;It's a bit of a challenge to do without your data, but maybe something like&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// Build query that gets takes your polygon precinct id and compares it against the polling place PRECINCTCODE
var ident = Concatenate("'%",$feature.PRECINCTCODE,"%'")

// Build Query polling place where code matches with a wildcard
var sql = Concatenate("PRECINCTCODE LIKE",ident)

// Get your polling place feature based on query. Update with your Polling Place layer name
var features = Filter(FeatureSetByName($map, "Polling Places"), sql)

// DESCRIPTION Should be whatever your polling place name is or whatever other fields you want to build as your output. Really this will just return 1 feature. You should include some error checking here if features are empty.
For (var f in features) {
  var polling_place = f.DESCRIPTION
}

var str_output = Concatenate("My polling place for this precinct is: ",polling_place)

return { 
	type : 'text', 
	text : str_output
}&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 13 Feb 2024 18:43:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/returning-attributes-from-a-featureset-where/m-p/1381762#M57456</guid>
      <dc:creator>JohnEvans6</dc:creator>
      <dc:date>2024-02-13T18:43:54Z</dc:date>
    </item>
    <item>
      <title>Re: Returning attributes from a FeatureSet where string values match</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/returning-attributes-from-a-featureset-where/m-p/1381859#M57462</link>
      <description>&lt;P&gt;Thank you so much, John! It worked like a charm! Now I'm able to select the precinct and the pop up will show the voting location.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ferreira_1-1707855016957.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/94660iE6E62E27AF48466A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ferreira_1-1707855016957.png" alt="Ferreira_1-1707855016957.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ferreira_2-1707855042515.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/94661i2DC99FF8C99D0800/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ferreira_2-1707855042515.png" alt="Ferreira_2-1707855042515.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm still trying to figure out how I'd go about having the voting location feature get selected once the user queries a precinct, for example.&amp;nbsp;As it shows in the first screenshot, when I select the precinct, it'll give me the address and location name - which is already great. However, since for that precinct the location is actually not within the precincts boundaries, I have to manually select the voting place.&lt;/P&gt;&lt;P&gt;I'm wondering if there's any tweaking around a quick app to make this happen, or if I'll just have to use Experience Builder to trigger this kind of action. Any suggestions?&lt;/P&gt;&lt;P&gt;Again, thank you so much for your help! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2024 20:23:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/returning-attributes-from-a-featureset-where/m-p/1381859#M57462</guid>
      <dc:creator>Ferreira</dc:creator>
      <dc:date>2024-02-13T20:23:40Z</dc:date>
    </item>
    <item>
      <title>Re: Returning attributes from a FeatureSet where string values match</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/returning-attributes-from-a-featureset-where/m-p/1382161#M57477</link>
      <description>&lt;P&gt;There's not really a lot of options via arcade for that. If you enable search on your polling place you could use the find parameter to add a URL to the summary window, but that basically opens the same map at the same place in a new tab with the polling place selected, which feels redundant. If its a good enough work around, just append&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;amp;find=856 &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;or whatever the polling place precinct number is.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 14 Feb 2024 13:44:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/returning-attributes-from-a-featureset-where/m-p/1382161#M57477</guid>
      <dc:creator>JohnEvans6</dc:creator>
      <dc:date>2024-02-14T13:44:32Z</dc:date>
    </item>
  </channel>
</rss>

