Solved

ExpressionEvaluator vs. AttributeManager

  • 10 March 2017
  • 7 replies
  • 4 views

Badge +1

Hi folks,

I have a an expression that works beautifully in the ExpressionEvaluator. I was hoping to use this in he AttributeManager as I wanted to do a similar thing to many fields and use conditionals, I tried many things and the expression never seems to work out with AttributeManager.

((@Value(SCORE)/20)*@Value(LOADING))+@Value(SCORE)

I tried changing to @div, @mult, and @add maths functions but they didn't get me any closer to the action

where am I going wrong :S

 

 

Thanks in advance!

icon

Best answer by redgeographics 10 March 2017, 11:43

View original

7 replies

Userlevel 5
Badge +25

If it works in the ExpressionEvaluator it should also work in the AttributeManager.

One thing you can check is whether or not you have entered this in the AttributeManager's arithmetic editor (which mimics the ExpressionEvaluator) or the text editor, in which case you'll get a text string as result... (I know I often make that mistake myself).

If that's not it, I'd like to know what kind of error message you're getting.

 

Userlevel 1
Badge +21

If it works in the ExpressionEvaluator it should also work in the AttributeManager.

One thing you can check is whether or not you have entered this in the AttributeManager's arithmetic editor (which mimics the ExpressionEvaluator) or the text editor, in which case you'll get a text string as result... (I know I often make that mistake myself).

If that's not it, I'd like to know what kind of error message you're getting.

 

Yes, I could really use a little message that says

 

"It looks like you've entered an arithmetic expression in the text editor, do you really mean to do this"

 

 

Badge +16
Yes, I could really use a little message that says

 

"It looks like you've entered an arithmetic expression in the text editor, do you really mean to do this"

 

 

and in addition to that automagically add the @Evaluate() function :)
Badge +1

If it works in the ExpressionEvaluator it should also work in the AttributeManager.

One thing you can check is whether or not you have entered this in the AttributeManager's arithmetic editor (which mimics the ExpressionEvaluator) or the text editor, in which case you'll get a text string as result... (I know I often make that mistake myself).

If that's not it, I'd like to know what kind of error message you're getting.

 

Ok i'm still a bit confused, my expression is:

 

((@Value(SCORE)/20)*@Value(LOADING))+@Value(SCORE)
which should work right? It appeared to wrok in my ExpressionEvaluator

 

 

Now I'm getting this error:

 

0684Q00000ArMX6QAN.jpg

 

Is there some trick I'm missing?

 

 

I've re-wrote and tried the expression in multiple ways, but alas no success. I tried evaluating the variable before the AttributeManager, no luck with that.

 

Userlevel 1
Badge +21
Ok i'm still a bit confused, my expression is:

 

((@Value(SCORE)/20)*@Value(LOADING))+@Value(SCORE)
which should work right? It appeared to wrok in my ExpressionEvaluator

 

 

Now I'm getting this error:

 

0684Q00000ArMX6QAN.jpg

 

Is there some trick I'm missing?

 

 

I've re-wrote and tried the expression in multiple ways, but alas no success. I tried evaluating the variable before the AttributeManager, no luck with that.

 

It looks like you might have a similar error in an earlier transformer where you create the SCORE attribute. It looks like instead of being a number, SCORE is set as 42*1.0/1.0

 

Badge +1
It looks like you might have a similar error in an earlier transformer where you create the SCORE attribute. It looks like instead of being a number, SCORE is set as 42*1.0/1.0

 

Good idea, I'll check my previous transformers and report back!
Badge +1
Good idea, I'll check my previous transformers and report back!
I can confirm it all works as expected! Now time for me to leave the office, thanks @redgeographics and @egomm :)

Reply