See the Record Name as part of the parcel properties

1093
3
03-08-2022 04:03 AM
Labels (1)
AmirBar-Maor
Esri Regular Contributor

Are you tired of seeing the records' GUID value and want to see the actual record' name?

AmirBarMaor_0-1646740588551.png

This video shows different methods of displaying the Records' name instead.

 

And here is the Arcade expression used. Just make sure to replace 'RecordHasTax' relationship class name with your relationship class name. If you are using enterprise geodatabase (AKA 'SDE') make sure to use the fully qualified name (as @GordonSumerling  rightfully points down below):

 

// Arcade expression to return the associated record name
var RecordName = First(FeatureSetByRelationshipName($feature, 'RecordHasTax', ['Name'], false));
if (!IsEmpty(RecordName)){return RecordName.name;}
return "Missing a record";

 

 

3 Replies
GordonSumerling
Esri Contributor

@AmirBar-Maor this is a great tip. Couple of comments:

  • For an Enterprise Geodatabase the relationshup is the fully quailfied table relationship like: <database>.<USER>.RecordHasTax
  • For it appear in the Web Service fabric it has to published as an expression as part of the service. It cannot be created post publishing.

cheers

Gordon

DeanAnderson2
Occasional Contributor II
  • For it appear in the Web Service fabric it has to published as an expression as part of the service. It cannot be created post publishing.

Not sure I follow.  I am just moving this rule over to a branched service environment as setup by my Enterprise Admin Folks (11.X/3.11.  The relationship classes are not visible in the portal but they are working because I can select all features associated with a record and it works.   Are you saying that the relationship classes must be explicitly published (so I can see them in portal)? 

SamMontoia1
New Contributor III

 

var records_features = FeatureSetByName($datastore, 
                   "<insert records feature class here>", 
                  ["Name", "GlobalID"], false);

var ret_guid = $feature.RetiredByRecord

var match = Filter(records_features, "GlobalID = @ret_guid");
var matchfeature = first(match);

if (matchfeature != null){
  return matchfeature.Name
}
return null

 

Here is an attempt at making an Arcade Expression for the looking up the  Retired By GUID and pushing the Retired By name into an additional field. It might be a little more generic and more easily adapted to other ParcelTypes.