Concatinating fields on the fly into a virtual field for feature services

353
2
Jump to solution
11-18-2021 02:11 PM
LyonMNGIS
Occasional Contributor

Hello,

I have a 3rd party that would like me to add an attribute to a feature service layer.  This field can be calculated from other fields.  I don't want to add a field on the main dataset as this will only be used for a specific application.  Is there a way to add a virtual field within a hosted layer view?

Thanks!

0 Kudos
1 Solution

Accepted Solutions
JohannesLindner
MVP Regular Contributor

AFAIK, not directly.

You have a few options:

  • use Arcade to show the virtual value in the popup
  • create the field, but calculate it automatically using an attribute rule
  • instead of publishing a feature class, publish a database view that contains the virtual field, calculated with SQL

Have a great day!
Johannes

View solution in original post

2 Replies
Scott_Tansley
Regular Contributor

Hi,

Assuming your software versions support it, then take a look at Arcade and the text functions there:

https://developers.arcgis.com/arcade/function-reference/text_functions/


Regards,


Scott

Scott Tansley
Consulting Architect (ArcGIS Enterprise)
https://www.linkedin.com/in/scotttansley/
JohannesLindner
MVP Regular Contributor

AFAIK, not directly.

You have a few options:

  • use Arcade to show the virtual value in the popup
  • create the field, but calculate it automatically using an attribute rule
  • instead of publishing a feature class, publish a database view that contains the virtual field, calculated with SQL

Have a great day!
Johannes