Hey everyone, I am attempting to create a renderer where the user is able to select the field on which to render based off of. I need to use UniqueValueDefinition as my render which means that I cannot use RendererChooser class—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developers. After selecting the field the chrome console shoots back the following error
Uncaught TypeError: a.getFieldsUsedInExpressions is not a function<SPAN class="line-numbers-rows"><SPAN></SPAN></SPAN>
My feature layer is created like so:
<SPAN class="keyword token">var</SPAN> landusePolygonLayer <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">FeatureLayer</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token"><SPAN>"</SPAN><A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fservices7.arcgis.com" target="_blank">https://services7.arcgis.com</A><SPAN>"</SPAN></SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">,</SPAN>
id<SPAN class="punctuation token">:</SPAN> <SPAN class="string token">"canada_Risk"</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="comment token">//confirm works</SPAN>
mode<SPAN class="punctuation token">:</SPAN> FeatureLayer<SPAN class="punctuation token">.</SPAN>MODE_ONDEMAND<SPAN class="punctuation token">,</SPAN>
outFields<SPAN class="punctuation token">:</SPAN> <SPAN class="punctuation token">[</SPAN><SPAN class="string token">"*"</SPAN><SPAN class="punctuation token">]</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>