<?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: $Feature.Field returns as empty when used as a parameter or in any context other than just itself. in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/feature-field-returns-as-empty-when-used-as-a/m-p/1165080#M54135</link>
    <description>&lt;P&gt;I'm not trying to generate a label in the map, if that's how the problem came across. I'm very new to ArcPro and so there are unknown unknowns about how everything is tied together in the database we're using but I believe it's the latter, a relationship class. The heirarchy in the attribute pane is&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kylehurst_1-1650248995767.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/39102i43318AF40C312A0D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kylehurst_1-1650248995767.png" alt="kylehurst_1-1650248995767.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;A new relationship is created in the tertiary splitter and that relationship is then added to the input or output section of the secondary splitter feature. "name to be changed" is related to the two objects (?) but neither of the splitters are related to each other. "name to be changed" has a field value equal to the tertiary's GID and I want to replace "name to be changed" with values from the tertiary so I can at a glance tell what tertiary splitters are related to the secondary without all the clicking.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 18 Apr 2022 02:34:42 GMT</pubDate>
    <dc:creator>Glasnoct</dc:creator>
    <dc:date>2022-04-18T02:34:42Z</dc:date>
    <item>
      <title>$Feature.Field returns as empty when used as a parameter or in any context other than just itself.</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/feature-field-returns-as-empty-when-used-as-a/m-p/1164999#M54130</link>
      <description>&lt;P&gt;I'm trying to get the object in my attribute pane to display based on a related feature's values so I can more easily identify some things about my selected object but I'm getting puzzling behavior from the $Feature.Field variable. We didn't have this issue in Arcpy before we realized that display properties expressions only allow Arcade, which we're even less familiar with and so we're having no luck. The selected nonspatial object exists in a standalone table (where we're trying to modify the display) and the feature we're trying to access is a spatial object in a layer if that matters.&lt;/P&gt;&lt;P&gt;Here are the different attempts at trying to figure out what syntax will actually return the variable not-empty.&lt;/P&gt;&lt;LI-CODE lang="c"&gt;//This alone verifies and displays correctly for labeling purposes
$Feature.Origin_ID

//All of the following return empty but still verify
var OID = $Feature.Origin_ID
return OID

or

Console(OID)

or

Console(Text($Feature.Origin_ID)) //thought it might be a format issue&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;forcing the console to return something along with the variable or using it in an sql expression reveals it's returning empty&lt;/P&gt;&lt;LI-CODE lang="c"&gt;//returns ORIGINID='' in console
var sql = "ORIGINID='" + OID + "'";
console(sql)

//returns '' in console
var str = concatenate("'", OID, "'")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know what is going on? I don't know enough about Arcade to even venture a guess.&lt;/P&gt;</description>
      <pubDate>Sun, 17 Apr 2022 13:15:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/feature-field-returns-as-empty-when-used-as-a/m-p/1164999#M54130</guid>
      <dc:creator>Glasnoct</dc:creator>
      <dc:date>2022-04-17T13:15:32Z</dc:date>
    </item>
    <item>
      <title>Re: $Feature.Field returns as empty when used as a parameter or in any context other than just itself.</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/feature-field-returns-as-empty-when-used-as-a/m-p/1165060#M54133</link>
      <description>&lt;P&gt;If you are using a table "Joined" to the feature class the syntax is like this (I.E. $feature['tablename.attributename']:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;"Attribute from feature class: " + $feature['CityTestPoints.CityName'] + TextFormatting.NewLine + "Attribute from joined table: " + $feature['TestData.TestField']&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;gives you:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KimGarbade_0-1650227717581.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/39092i9F884A4F8FD30B38/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KimGarbade_0-1650227717581.png" alt="KimGarbade_0-1650227717581.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Is this what you are asking about, or are you using a relationship class to associated the feature class with the related table data?&lt;/P&gt;</description>
      <pubDate>Sun, 17 Apr 2022 20:49:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/feature-field-returns-as-empty-when-used-as-a/m-p/1165060#M54133</guid>
      <dc:creator>KimberlyGarbade</dc:creator>
      <dc:date>2022-04-17T20:49:26Z</dc:date>
    </item>
    <item>
      <title>Re: $Feature.Field returns as empty when used as a parameter or in any context other than just itself.</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/feature-field-returns-as-empty-when-used-as-a/m-p/1165080#M54135</link>
      <description>&lt;P&gt;I'm not trying to generate a label in the map, if that's how the problem came across. I'm very new to ArcPro and so there are unknown unknowns about how everything is tied together in the database we're using but I believe it's the latter, a relationship class. The heirarchy in the attribute pane is&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kylehurst_1-1650248995767.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/39102i43318AF40C312A0D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kylehurst_1-1650248995767.png" alt="kylehurst_1-1650248995767.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;A new relationship is created in the tertiary splitter and that relationship is then added to the input or output section of the secondary splitter feature. "name to be changed" is related to the two objects (?) but neither of the splitters are related to each other. "name to be changed" has a field value equal to the tertiary's GID and I want to replace "name to be changed" with values from the tertiary so I can at a glance tell what tertiary splitters are related to the secondary without all the clicking.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Apr 2022 02:34:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/feature-field-returns-as-empty-when-used-as-a/m-p/1165080#M54135</guid>
      <dc:creator>Glasnoct</dc:creator>
      <dc:date>2022-04-18T02:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: $Feature.Field returns as empty when used as a parameter or in any context other than just itself.</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/feature-field-returns-as-empty-when-used-as-a/m-p/1165250#M54152</link>
      <description>&lt;P&gt;This code verifies. I had to put in an if clause because trying to validate it without a case that $feature.ORIGIN_ID was null, it would not, in which case currently it just falls back to a static ID for debugging purposes.&lt;/P&gt;&lt;LI-CODE lang="c"&gt;//'0CF9D009-B25C-4F7C-BA45-7FB1CA76D925'
var GID = Iif(IsEmpty($feature.ORIGIN_GID), '0CF9D009-B25C-4F7C-BA45-7FB1CA76D925', $feature.ORIGIN_GID);
var fs = FeatureSetByName($datastore,"FiberSplitter");
var sql = "GLOBALID='{" + GID + "}'";
var result = First(Filter(fs, sql))
var displayname = when(
result.SPLITTER_ORDER == 1, "Primary 1x" + result.SPLITTER_RATIO,
result.SPLITTER_ORDER == 2, "Secondary 1x" + result.SPLITTER_RATIO,
result.SPLITTER_ORDER == 3, "Tertiary 1x" + result.SPLITTER_RATIO,
"Splitter"
)
console(displayname + " (" + result.OBJECTID + ")")
return displayname&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kylehurst_0-1650303291447.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/39143i3EE0465FF861DEB3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kylehurst_0-1650303291447.png" alt="kylehurst_0-1650303291447.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've successfully retrieved the info I'm looking for but the display name won't actually update in the attribute pane and I don't know if perhaps the expression is too computationally expensive and Arc defaults back as a result? Is that a thing? The display option in the table properties is actually blank when I check versus &amp;lt;expression&amp;gt; like it is for other custom labels.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kylehurst_1-1650303513843.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/39144i0AA574A483BE9467/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kylehurst_1-1650303513843.png" alt="kylehurst_1-1650303513843.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Apr 2022 17:38:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/feature-field-returns-as-empty-when-used-as-a/m-p/1165250#M54152</guid>
      <dc:creator>Glasnoct</dc:creator>
      <dc:date>2022-04-18T17:38:40Z</dc:date>
    </item>
  </channel>
</rss>

