Hi
I have a workflow where we are calling a custom arithmetic function (DoubleAsRaw64) to generate a new attribute value based on the old value - this happen in 20+ workplaces on many different attributes.
We currently do this by using the AttributeManager and:
1) Checking if the attribute value has a value
2) If it has a value then we do @Evaluate(@DoubleAsRaw64(@Value(NameOfAttribute)))
I would like to encapsulate this in an custom transformer where I would just have to check of the Attributes on a list - and the the transformer will then apply the DoubleAsRaw64 function on those attributes. This would create a cleaner workplace and minimize the risk for typo etc.
I have tried to create a super simple custom transformer with one Attribute List as a published parameter Attributes_to_Raw64.
And a single ExpressionEvaluator set to overwrite the attributes in $(Attributes_to_Raw64)
the Arithmetic Expression is @Evaluate(@DoubleAsRaw64(@CurrentAttribute()))
This works if I have a single attribute selected in Attributes_to_Raw64 - but as soon as I select more attributes the transformer fails.
So my questions are:
1) How are I implement this so it works with more than one attribute selected to be evaluated per feature?
2) How do I best implement a quick null check?
3) How do I do this in an efficient way (as there will be millions of features passing though this).
I would be grateful for any pointers!
Thank you!
Custom Transformer: