Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Select Expert with a formula Field

Status
Not open for further replies.

gusc999

Technical User
Nov 20, 2007
42
0
0
US
I created the formula field below to use it with the "Select Expert" but when I try to select it, it does not display the "@Ovr" field. Is there another way of doing this?

I would greatly appreciate any help?

[Field name "@Ovr"]
if {PIRUSER.USWHDP}= "DRY" AND {PIRTRAN.PTTASK}= "LUNCH" AND {@DATE DIFF} >=70
THEN "DRY-LNCH-OVER"
ELSE
if {PIRUSER.USWHDP}= "DRY" AND {PIRTRAN.PTTASK}= "BREAK" AND {@DATE DIFF} >=25
THEN "DRY-BRK-OVER"
ELSE
if {PIRUSER.USWHDP}= "DRY" AND {PIRTRAN.PTTASK}= "BEGLCH" AND {@DATE DIFF} >=70
THEN "DRY-LNCH-OVER"
ELSE
if {PIRUSER.USWHDP}= "CLR" AND {PIRTRAN.PTTASK}= "LUNCH" AND {@DATE DIFF} >=80
THEN "CLR-LNCH-OVER"
ELSE
if {PIRUSER.USWHDP}= "CLR" AND {PIRTRAN.PTTASK}= "BREAK" AND {@DATE DIFF} >=30
THEN "CLR-BRK-OVER"
ELSE
if {PIRUSER.USWHDP}= "CLR" AND {PIRTRAN.PTTASK}= "BEGLCH" AND {@DATE DIFF} >=80
THEN "CLR-LNCH-OVER"
ELSE
if {PIRUSER.USWHDP}= "FRZ" AND {PIRTRAN.PTTASK}= "LUNCH" AND {@DATE DIFF} >=80
THEN "FRZ-LNCH-OVER"
ELSE
if {PIRUSER.USWHDP}= "FRZ" AND {PIRTRAN.PTTASK}= "BREAK" AND {@DATE DIFF} >=30
THEN "FRZ-BRK-OVER"
else
if {PIRUSER.USWHDP}= "FRZ" AND {PIRTRAN.PTTASK}= "BEGLCH" AND {@DATE DIFF} >=80
THEN "FRZ-LNCH-OVER"
ELSE
if {PIRUSER.USWHDP}= "DRY" AND {PIRTRAN.PTTASK}= "BATCG" AND {@DATE DIFF} >=15
THEN "BATCHG-OVER"
ELSE
if {PIRUSER.USWHDP}= "CLR" AND {PIRTRAN.PTTASK}= "BATCG" AND {@DATE DIFF} >=15
THEN "BATCHG-OVER"
ELSE
if {PIRUSER.USWHDP}= "FRZ" AND {PIRTRAN.PTTASK}= "BATCG" AND {@DATE DIFF} >=15
THEN "BATCHG-OVER"
ELSE
"OK
 
Please show the formula {@DATE DIFF}

Also consider using the record selection formula editor rather than the select expert.

Software Sales, Training, Implementation and Support for Macola, Synergy, and Crystal Reports. Check out our Macola tools:
 
Here is the formula

DateDiff ("n",{@STRT X} ,{@END X} )
 
When asked to show the content of a formula, you should always show the content of all nested formulas as well. You must be using "whileprintingrecords" or a previous() or next() function in one of these formulas, or else one of the formulas contain a summary function.

-LB
 
How do the Previous() and Next() functions work?
 
They capture the previous or next row of the field used in the parens. So what is the content of your nested formulas?

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top