Is calculating a field based on another field from a joined table supported?

625
4
01-07-2020 09:01 AM
RobBlash
Occasional Contributor III

I have 2 hosted feature services, a "production" HFS and an "updated" HFS. The production data was published from Pro, the updated data was published as a HFS from a zipped GDB upload.

I've created the join in AGOL based on a common ID, and saved the join as an HFS view. I want to update attributes in the production data from values in the update table. The underlying production HFS is editable. Seems like this should all be doable, but I get errors with SQL or Arcade.

0 Kudos
4 Replies
XanderBakker
Esri Esteemed Contributor

Hi Rob Blash ,

Not sure if there is a restriction on calculation based on fields from a joined table. In Arcade however, you don't need any joins to do this. You can just use the FeatureSetBy* functions to do the join on the fly.

What is the cardinality? Is is 1:1 or 1:n?

RobBlash
Occasional Contributor III

Thanks Xander. I was hoping the join could do it for simplicity, but Arcade would work. The join in this case is 1:1.

Do you have any example scripts for updating using FeatureSet?

0 Kudos
XanderBakker
Esri Esteemed Contributor

Hi rblash ,

I do have an example here. You should look at the second example. In your case it would be simpler since you have 1:1 relationship: Using FeatureSetBy functions in Arcade to drill-down to other layers and tables 

If you have any questions we can look specifically at your use case.

RobBlash
Occasional Contributor III

Thanks, I'll take a look

0 Kudos