My case is like following:
1. user selects a feature.
2. user creates a new row in the feature's relate table
3. An Arcade attribute rule in the relate table will get the selected feature's ID and assign the ID to the newly created row.
Not sure if this can be done since two $feature variables needed. have not see a sample which updates a table.
Note: database is Oracle/SDE. Table is registered with SDE so it has OID.
Thanks...
Solved! Go to Solution.
What you describe isn't possible right now, because Arcade doesn't recognize selections.
It is absolutely possible to get other tables (take a look at the FeatureSetBy* functions) and to edit another table (take a look at this blog).
So you could get your feature class with FetaureSetBy* and then filter it. For that, you need a field that is in both tables. In your case, that is likely the ID, and you want to get that, so this way isn't possible.
If the table you're creating a new row in (step 2) is a feature class, maybe an intersect works for you ("If this new point intersects an existing polygon, take that polygon's ID").
If you have a feature class and a non-spatial table, and the only field linking those is ID, then you can't do this with Arcade.
What you could do:
What you describe isn't possible right now, because Arcade doesn't recognize selections.
It is absolutely possible to get other tables (take a look at the FeatureSetBy* functions) and to edit another table (take a look at this blog).
So you could get your feature class with FetaureSetBy* and then filter it. For that, you need a field that is in both tables. In your case, that is likely the ID, and you want to get that, so this way isn't possible.
If the table you're creating a new row in (step 2) is a feature class, maybe an intersect works for you ("If this new point intersects an existing polygon, take that polygon's ID").
If you have a feature class and a non-spatial table, and the only field linking those is ID, then you can't do this with Arcade.
What you could do:
Thanks! Too bad that i can't do the attribute rule on this. However your solution worth to explore.
I tried this out and it works very well. with editor tracking applied, all the values which need to be entered automatically are done. thanks. very smart!
Hi there,
Is there a way to replicate this workflow if I have the data layer and relationship table published as a feature service in Enterprise?
Thanks