Hello,
Does anyone knows if it is possible with a Calculation Attribute Rule to append a record to another table?
My objective is whenever a point is edited to write a record to a table.
I’ve been looking around the forum and the help and this doesn’t seem possible in Arcade, however it might be that I missed something.
Thanks all,
Bart-Jan Schoenmakers
Statistics Portugal
Solved! Go to Solution.
This is absolutely possible.
Instead of specifying the field for the rule and returning a value, you leave the field empty and return a dictionary. This dictionary has to have a defined structure, which you can find here:
A simple example:
// Calculation Attribute Rule
// field: empty
// triggers: insert
return {
edit: [
{className: "OtherTable",
adds: [
{attributes: {TextField: "Value", IntegerField: 5}}
]
}
]
}
EDIT: And you can do lots of other things, too. A few examples are listed in this blog post:
Advanced Attribute Rules - Editing features on another class with attribute rules (esri.com)
Hi Johannes,
Thank you for this example and the link of the help.
I easily managed to get an example to work. I only knew the return dictionary for multiple fields, but dictionaries are so much more useful and powerful. I thought I had to develop a trigger in Oracle.
Bart
This is absolutely possible.
Instead of specifying the field for the rule and returning a value, you leave the field empty and return a dictionary. This dictionary has to have a defined structure, which you can find here:
A simple example:
// Calculation Attribute Rule
// field: empty
// triggers: insert
return {
edit: [
{className: "OtherTable",
adds: [
{attributes: {TextField: "Value", IntegerField: 5}}
]
}
]
}
EDIT: And you can do lots of other things, too. A few examples are listed in this blog post:
Advanced Attribute Rules - Editing features on another class with attribute rules (esri.com)
Hi Johannes,
Thank you for this example and the link of the help.
I easily managed to get an example to work. I only knew the return dictionary for multiple fields, but dictionaries are so much more useful and powerful. I thought I had to develop a trigger in Oracle.
Bart