ThoroTech    ThoroTech Racing    ThoroTech Racing  Hop To Forum Categories  EquiSim - Using    Expression logic question
Page 1 2 
Go
New
Find
Notify
Tools
Reply
  
Expression logic question
 Login/Join 
Graded Stakes
Posted Hide Post
Good thinking Lou; that did the trick.

I live in the Orland Park area -- SW suburbs -- spittin' distance from a couple of OTBs. LOL

Used to make the trip to AP but traffic usually sucked on the way home on 53/290/294.

Good luck.
 
Posts: 213 | Location: Chicagoland | Registered: November 23, 2003Reply With QuoteReport This Post
Graded Stakes
Posted Hide Post
I'm going to bump this topic up because I'm missing something. Is it possible to get the higher value from either of two columns into a third? How would I do it? This doesn't work: #GREATER(#COLVAL(1), #COLVAL(2)).
 
Posts: 231 | Location: Oregon | Registered: April 23, 2003Reply With QuoteReport This Post
Graded Stakes
Posted Hide Post
Figured it out.

(#GREATER(#COLVAL(5), #COLVAL(6))*#COLVAL(5))+(#GREATER(#COLVAL(6), #COLVAL(5))*#COLVAL(6))
 
Posts: 231 | Location: Oregon | Registered: April 23, 2003Reply With QuoteReport This Post
Steward
Graded Stakes
Picture of Nathan M.
Posted Hide Post
Bill,

There may be an easier way using VBScript functions.

There's a "max" funcion in C that takes two params and returns the maximum value.

max(#COLVAL(x), #COLVAL(y))

would give you what you want -- if the VBScript function exists and you can find the correct syntax.
 
Posts: 1981 | Location: North East OH | Registered: July 23, 2002Reply With QuoteReport This Post
Graded Stakes
Posted Hide Post
Bill,

#GREATER(#COLVAL(1), #COLVAL(2)) * #COLVAL(1) +
#GREATER(#COLVAL(2), #COLVAL(1)) * #COLVAL(2) +
#EQUAL(#COLVAL(1), #COLVAL(2), .00001) * #COLVAL(1)

Also covers you if the two cols are equal Wink

Don't know about Max - I'll look it up and try it...

Lou
 
Posts: 284 | Location: Chicago Area | Registered: March 28, 2004Reply With QuoteReport This Post
Graded Stakes
Posted Hide Post
Whoops - need to parenthesize each sub-expression, but you get the idea
 
Posts: 284 | Location: Chicago Area | Registered: March 28, 2004Reply With QuoteReport This Post
Graded Stakes
Posted Hide Post
Re: Max

Nope, no Max function in VBScript docs - there's a MaxValue parameter for limiting the value of variables but that doesn't apply for what you want to do...
 
Posts: 284 | Location: Chicago Area | Registered: March 28, 2004Reply With QuoteReport This Post
Steward
Graded Stakes
Picture of Nathan M.
Posted Hide Post
If that's the case I will add a Max/Min that returns the max, or min, value given to it (the function).
 
Posts: 1981 | Location: North East OH | Registered: July 23, 2002Reply With QuoteReport This Post
Graded Stakes
Posted Hide Post
Thanks for the heads up Lou

#EQUAL(#COLVAL(1), #COLVAL(2), .00001) * #COLVAL(1)

Bill N
 
Posts: 231 | Location: Oregon | Registered: April 23, 2003Reply With QuoteReport This Post
  Powered by Social Strata Page 1 2  
 

ThoroTech    ThoroTech Racing    ThoroTech Racing  Hop To Forum Categories  EquiSim - Using    Expression logic question

© 2002