Skip to main content
Solved

ExpressionEvaluator vs. AttributeManager


Forum|alt.badge.img+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!

Best answer by redgeographics

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.

 

View original
Did this help you find an answer to your question?

7 replies

redgeographics
Celebrity
Forum|alt.badge.img+48
  • Celebrity
  • Best Answer
  • March 10, 2017

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.

 


ebygomm
Influencer
Forum|alt.badge.img+31
  • Influencer
  • March 10, 2017
redgeographics wrote:

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"

 

 


itay
Supporter
Forum|alt.badge.img+16
  • Supporter
  • March 10, 2017
ebygomm wrote:
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 :)

Forum|alt.badge.img+1
  • Author
  • March 10, 2017
redgeographics wrote:

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.

 


ebygomm
Influencer
Forum|alt.badge.img+31
  • Influencer
  • March 10, 2017
osarhan wrote:
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

 


Forum|alt.badge.img+1
  • Author
  • March 10, 2017
ebygomm wrote:
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!

Forum|alt.badge.img+1
  • Author
  • March 10, 2017
osarhan wrote:
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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings