Alias

The alias profile allows the map author to write an expression to evaluate a numeric value and return a text alias representing that value.

When the alias is needed, the script will be evaluated. It will be passed the value for which an alias is desired. It is expected that the script returns a text value, comprising the alias to be shown.

Context

The following products implement this profile:

Spatial reference

The spatial reference of the map in which the expression executes determines the execution context's spatial reference.

Time zone

The time zone of the map in which the expression executes determines the execution context's default time zone.

Profile Variables

Variable NameTypeDescription
$valueNumberThe numeric value for which a text alias is desired.

Function Bundles

Core | Geometry

Return types

Text

Example

Calculates an alias string for building floors stored as integers configured for a range selector.

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
if ($value < 0){
  return "Basement " + Abs($value);
}
else if ($value == 0){
  return "Ground Floor";
}
else {
  return "Floor " + $value;
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close