<?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 Arcade accessing Fields from FeatureSet in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/arcade-accessing-fields-from-featureset/m-p/1221379#M48311</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Having issues with retrieving a field from a FeatureSet. Following other examples, referring the Field name as per below is supposed to work:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;myFeature.job_wo
myFeature["job_wo"]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However I get a:&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Execution Error:&lt;/SPAN&gt;&lt;SPAN&gt;Runtime Error: Cannot call member property on object of this type. job_wo&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The below is my code for reference:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var portal = Portal('https://linktomyportal/');
var completed_surveys = FeatureSetByPortalItem(
    portal,
    'portalobjectid',
    0,
    [
        'objectid',
        'job_wo'
    ],
    false
);
Console(completed_surveys.job_wo);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 13 Oct 2022 03:13:04 GMT</pubDate>
    <dc:creator>MatthewHoare1</dc:creator>
    <dc:date>2022-10-13T03:13:04Z</dc:date>
    <item>
      <title>Arcade accessing Fields from FeatureSet</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-accessing-fields-from-featureset/m-p/1221379#M48311</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Having issues with retrieving a field from a FeatureSet. Following other examples, referring the Field name as per below is supposed to work:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;myFeature.job_wo
myFeature["job_wo"]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However I get a:&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Execution Error:&lt;/SPAN&gt;&lt;SPAN&gt;Runtime Error: Cannot call member property on object of this type. job_wo&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The below is my code for reference:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var portal = Portal('https://linktomyportal/');
var completed_surveys = FeatureSetByPortalItem(
    portal,
    'portalobjectid',
    0,
    [
        'objectid',
        'job_wo'
    ],
    false
);
Console(completed_surveys.job_wo);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 03:13:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-accessing-fields-from-featureset/m-p/1221379#M48311</guid>
      <dc:creator>MatthewHoare1</dc:creator>
      <dc:date>2022-10-13T03:13:04Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade accessing Fields from FeatureSet</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-accessing-fields-from-featureset/m-p/1221451#M48315</link>
      <description>&lt;P&gt;completed_surveys is a Featureset, a collection of features. You can only call the field name on single features.&lt;/P&gt;&lt;P&gt;So you have to extract a feature from the featureset. One way to do it:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var completed_surveys = ...

// just get the first feature
var survey = First(completed_surveys)

// we have to check that survey is not null, else we would produce an error
// by calling a member property of null
if(survey == null) {
    Console("survey is null -&amp;gt; completed_surveys is empty")
} else {
    Console(survey.job_wo)
}&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 13 Oct 2022 11:32:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-accessing-fields-from-featureset/m-p/1221451#M48315</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2022-10-13T11:32:15Z</dc:date>
    </item>
  </channel>
</rss>

