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.
Here are the different attempts at trying to figure out what syntax will actually return the variable not-empty.
//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
forcing the console to return something along with the variable or using it in an sql expression reveals it's returning empty
//returns ORIGINID='' in console
var sql = "ORIGINID='" + OID + "'";
console(sql)
//returns '' in console
var str = concatenate("'", OID, "'")
Does anyone know what is going on? I don't know enough about Arcade to even venture a guess.