Help with Syntax in a BAQ Calculated Field

HI

Your code should work but  you really should not subtract from an empty date - when running with TODAY every time the dashboard is refreshed or executed it will calculate the correct number of days


if  (PORel.Date01  = "") Then

     TODAY - POHeader.OrderDate  


Else

     0 (since you would be a returning a number value (number of days) then your else will need to be numeric as well - so it would be zero)


Marianne Gizzi

Estes Group - Epicor Partner

mgizzi@...

I'm not really a code person, unfortunately.  


I have a field on the Po Release table, "Date Sent to Vendor", which is binded to PORel.Date01

I need a calculated field to basically say...


if PoRel.Date01 = ""

Then

PORel.Date01 - POHeader.OrderDate

Else

""


What would be the correct syntax?

Not sure what the end result you want.

Your If statement says;

If the PORel.Date01 field is empty subtract the POHeader.Orderdate from it otherwise return nothing/empty.

If the date is empty subtracting the order date from it would end up with a date way back yonder if it worked at all.

If you restate with your business requirement we can help with the syntax of the calculated field.

Jim Kinneman
Encompass Solutions, Inc.
ah ok.  

We have a procedure requiring Engineering sign-off on all POs containing specific types of components.  So, since there is already a PO Date field, I created a UD field on the PO Release table for "Date Sent to the Vendor"  then I have a dashboard with these two dates.  So, what i want to do is narrow down to the POs that are not sent to the vendor yet, and possibly sitting in an Engineers inbox or something...

if PoRel.Date01 = ""

(For those records that DO NOT have a "Date Sent to Vendor" yet)

Then

PORel.Date01 - POHeader.OrderDate

(I want to return how many days have lapsed from PODate to Date Sent)

Else

""

(Else, I don't need anything)




Does this help?