Is it possible to calculate a field using another field that was created by an attribute expression in AGOL?

488
4
09-12-2018 10:06 AM
by Anonymous User
Not applicable

I am creating an application at work to track mileage for our employees. I have created a web map containing a hosted line feature layer to track employees driving paths. I then created an attribute expression to calculate total distance in miles. Shown below: 

This calculation then automatically creates a field in my attribute table and names the field 'Custom', shown below:

What I would like to do now is take this 'custom' field and calculate the cost of mileage using the 2018 IRS Mileage Rate of $0.545 per mile. I have tried everything I could think of and CANNOT find a calculation that will work, especially considering that my 'custom' field doesn't show up as an option for use in a new calculation for an Attribute Expression. I have also attempted to create a new field called 'cost' and attempted to calculate the field using the 'custom' field but it also does not show up as an option to be used within a calculation. 

I am starting to think creating a new field based off of an attribute expression is not supported or pretty much impossible. Has anyone experienced this same issue? Or does anyone have any other ideas of another way I could calculate mileage and then cost?

Thanks!

0 Kudos
4 Replies
KellyGerrow
Esri Frequent Contributor

Hi Siona,

I'd suggest waiting until the release next week. In the release you will be able to calculate fields with Arcade in addition to SQL. I'd suggest calculating the fields as new fields so you can use them for further calculations.

-Kelly

by Anonymous User
Not applicable

Great! I wasn't aware of this release. Just to clarify, when you say 'calculating the fields as new fields', do you mean there is an arcade expression that tells the software to place the output of the calculation in a new field? 

0 Kudos
by Anonymous User
Not applicable

Also Kelly, do you happen to know when this release will be this week? I can't seem to find anything online about this release. 

Thanks! 

0 Kudos
KellyGerrow
Esri Frequent Contributor

Hi Siona,

The release is planned for this evening PST, so the new functionality will be available tomorrow morning.

0 Kudos