<?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 Can Arcade expressions be used in AGSUniqueValueRenderer? in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/can-arcade-expressions-be-used-in/m-p/57456#M539</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can Arcade expressions be used in AGSUniqueValueRenderer in a similar&amp;nbsp;fashion as the valueExpression property of UniqueValueRenderer in the JavaScript API?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to define symbols based on selective values across multiple attributes (e.g. attribute A = "foo" OR attribute B = "bar") and I can't figure out&amp;nbsp;how to achieve that using&amp;nbsp;&lt;SPAN&gt;AGSUniqueValueRenderer in the iOS SDK. Is there a way?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I also didn't have much luck subclassing AGSRenderer and defining my own symbolForFeature logic.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 19 Oct 2019 00:18:40 GMT</pubDate>
    <dc:creator>AndrewLeung</dc:creator>
    <dc:date>2019-10-19T00:18:40Z</dc:date>
    <item>
      <title>Can Arcade expressions be used in AGSUniqueValueRenderer?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/can-arcade-expressions-be-used-in/m-p/57456#M539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can Arcade expressions be used in AGSUniqueValueRenderer in a similar&amp;nbsp;fashion as the valueExpression property of UniqueValueRenderer in the JavaScript API?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to define symbols based on selective values across multiple attributes (e.g. attribute A = "foo" OR attribute B = "bar") and I can't figure out&amp;nbsp;how to achieve that using&amp;nbsp;&lt;SPAN&gt;AGSUniqueValueRenderer in the iOS SDK. Is there a way?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I also didn't have much luck subclassing AGSRenderer and defining my own symbolForFeature logic.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Oct 2019 00:18:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/can-arcade-expressions-be-used-in/m-p/57456#M539</guid>
      <dc:creator>AndrewLeung</dc:creator>
      <dc:date>2019-10-19T00:18:40Z</dc:date>
    </item>
    <item>
      <title>Re: Can Arcade expressions be used in AGSUniqueValueRenderer?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/can-arcade-expressions-be-used-in/m-p/57457#M540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So it looks like valueExpression on a UVR should work, there just isn't an API in Runtime to manipulate it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One thing you could try is to&amp;nbsp;define a UVR with a valueExpression in the JS API and use &lt;STRONG&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-UniqueValueRenderer.html#toJSON"&gt;toJson()&lt;/A&gt;&lt;/STRONG&gt; on it to get back JSON, translate that JSON to a NSDictionary, then provide that dictionary to the Runtime's &lt;A href="https://developers.arcgis.com/ios/latest/api-reference/protocol_a_g_s_j_s_o_n_serializable-p.html#af6bde6b0c48c5c74f1d7d721780f3a59"&gt;&lt;STRONG&gt;AGSUniqueValueRenderer.fromJSON:error:()&lt;/STRONG&gt;&lt;/A&gt; method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does that help? Let me know how that goes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Two notes:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;You could get that JSON out of a saved web map&amp;nbsp;using &lt;A href="https://ago-assistant.esri.com"&gt;AGO Assistant&lt;/A&gt;&amp;nbsp;if you prefer not to do any JS API code.&lt;/LI&gt;&lt;LI&gt;Another approach would be to use a Dictionary Renderer. See &lt;A href="https://www.esri.com/arcgis-blog/products/arcgis-pro/mapping/create-custom-dictionary-styles-for-arcgis/"&gt;this blog post&lt;/A&gt; for some info on that.&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Oct 2019 21:11:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/can-arcade-expressions-be-used-in/m-p/57457#M540</guid>
      <dc:creator>Nicholas-Furness</dc:creator>
      <dc:date>2019-10-25T21:11:57Z</dc:date>
    </item>
  </channel>
</rss>

