Select to view content in your preferred language

Is It Possible to Change Back To OG Value During Edits in Arcade?

55
1
Thursday
LeviCecil
Frequent Contributor

I'm creating an attribute rule for a symbology label field to change when an asset type field is changed. I'm wondering if it's possible to store the original value and then revert to it if someone decides it's incorrect? I've tried storing the OG value as a variable and then returning that at the end of an IIF or When statement. 

Here's what I've tried so far and it's not working:

var original_symbol = $originalFeature.symbol

if($feature.ASSETTYPE == 'Drop Manhole'){
  return 'MANHOLE_DRP';
} else {
 return original_symbol;
}

 

0 Kudos
1 Reply
DavidSolari
MVP Regular Contributor

If you need to store the original data between edits, you'll need an extra field to log that with one rule, then use another rule to retrieve it later.

If it's all happening in the span of the same edit, you can usually just return without a value and the attribute rule won't edit anything.

0 Kudos