|
Go
![]() |
New
![]() |
Find
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
|
Graded Stakes |
Nathan,
I would like to create an expression that will put $ppSpeedFig in a column if the finish of the paceline was either in the money or within 5 lengths. Maybe it's just too late at night but I can't seem to see how to do this. Help... Thanks Lou |
||
|
|
Steward Graded Stakes ![]() |
Of course, its the "OR" that causes the trouble.
Let's see: $ppSpeedFig * #LESSER($ppFinish, 4) That gives you the speed fig if the finish was in the money - otherwise its a zero $ppSpeedFig * #LESSER($ppBtnLengthsFinish * #GREATER($ppFinish, 1), 5) That gives you the speed fig if the btnlengths are less than 5, or the horse won the race. Now, and AND would be easy - this says show the speed fig if the horse was in the top 3 and was beaten by no more than 5 lengths: $ppSpeedFig * ( #LESSER($ppFinish, 4) * #LESSER($ppBtnLengthsFinish * #GREATER($ppFinish, 1), 5) ) I'm not seeing an easy way to do the OR, other than to use two separate columns.... |
|||
|
|
Graded Stakes |
Thanks - I thought it was just me. I'll try the two-column approach and go from there with a #GREATER(#COLVAL...) to get it all in one column.
Best to you and yours, Lou |
|||
|
|
Graded Stakes |
Lou,
How did you wind up resolving this? I have the same test as you but want to assign a point value instead of the $ppSpeedFig value. I am still trying the V5 demo; not much of a coder and really miss being able to use conditional statements. Any help would be appreciated. Thanks. HH |
|||
|
|
Graded Stakes |
HH,
Actually, I haven't resolved it yet - got involved in other things but I'm sure it can be accomplished using multiple columns as Nathan suggested. Lou |
|||
|
|
Graded Stakes |
HH,
Let me expand on that a bit... col 1 #Lesser(BtnLengths, 5.1 + "LESSER(FinishPos, 4.1) gives a value between 0-2 col 2 #GREATER(#COLVAL(1), 0) * ppSpeedFig Will that work? I dunno - try it. Lou |
|||
|
|
Graded Stakes |
sorry for the sloppy typing above but you get the idea...
|
|||
|
|
Graded Stakes |
Lou,
Thanks. Turns out that my idea was based on a max of 4 pp lines, hence I think I have to do it with #h functions. I came up with this mess: 12 * #GREATER((#LESSER(#hMIN("ppfinish", 0, 1000, 0, 50, 0, 0, 4, 0, 10000),4)) + (#LESSER(#hMIN("ppBtnLengthsFinish", 0, 1000, 0, 50, 0, 0, 4, 0, 10000),5)),0) If either of the conditions were true, they would add up to a value of at least one. So if the value was >0 it would assign 12 points in the column. I never could write tight code but this seems to work. HH |
|||
|
|
Graded Stakes |
Except that the above code will include an assignment of points if no PP (1st time starter). Not sure how to fix that.
|
|||
|
|
Graded Stakes |
HH - Multiply by #LESSER(number_of_races, 1) don't know the name of the variable for that, but there probably is one...
I'm in Des Plaines, IL by the way - almost spitting distance from AP. Best, Lou |
|||
|