Yeah I think you're right... The BAQ progress interpreter for calc fields just assumes the End.'s based upon the If, Else, If... statement layout.
Thanks Rob
Rob
________________________________
From: Rob Bucek <rbucek@...>
To: vantage@yahoogroups.com
Sent: Wednesday, May 20, 2009 2:30:22 PM
Subject: RE: [Vantage] Re: Field calculation if-then statement for range
You shouldn't need those End statements either...heres a calculated
field in a BAQ for a decimal column I wrote that works well...
if labordtl.labortype= "I" then if labordtl.indirectco de="PMB" then 0
else if labordtl.indirectco de="STB" then 0 else labordtl.laborhrs else 0
Rob Bucek
Manufacturing Engineer
PH: 715-284-5376 ext 311
FAX: 715-284-4084
<http://www.dsmfg com/>
(Click the logo to view our site)
____________ _________ _________ __
From: vantage@yahoogroups .com [mailto:vantage@yahoogroups .com] On Behalf
Of bw2868bond
Sent: Wednesday, May 20, 2009 10:53 AM
To: vantage@yahoogroups .com
Subject: [Vantage] Re: Field calculation if-then statement for range
The calculated field you are creating in your BAQ has the data type of
string ?
--- In vantage@yahoogroups .com <mailto:vantage% 40yahoogroups. com> ,
"emverbeke" <emverbeke@. ..> wrote:
QuoteHed.Confidence Pct field. So this is what I have.
parenthesis. If you get an error when testing the BAQ, try it without.
yourtable.yourfield value in another calculated field in your BAQ, you
can NOT reference that calculated field by name in another calculated
field.
v8.03.305-405a versions I've used).
you would have to purchase the progress development environment (for no
small fee!).
size) are who they are.
their development environments, while not free, are certainly not
financial back-breakers either.
SQL equivalent result code.
the percentage is 26-50 to put 50 and so on. I've looked t the 3643ESC
document as well as the 4GL book but I'm not have much luck. Any ideas?
[Non-text portions of this message have been removed]
Thanks Rob
Rob
________________________________
From: Rob Bucek <rbucek@...>
To: vantage@yahoogroups.com
Sent: Wednesday, May 20, 2009 2:30:22 PM
Subject: RE: [Vantage] Re: Field calculation if-then statement for range
You shouldn't need those End statements either...heres a calculated
field in a BAQ for a decimal column I wrote that works well...
if labordtl.labortype= "I" then if labordtl.indirectco de="PMB" then 0
else if labordtl.indirectco de="STB" then 0 else labordtl.laborhrs else 0
Rob Bucek
Manufacturing Engineer
PH: 715-284-5376 ext 311
FAX: 715-284-4084
<http://www.dsmfg com/>
(Click the logo to view our site)
____________ _________ _________ __
From: vantage@yahoogroups .com [mailto:vantage@yahoogroups .com] On Behalf
Of bw2868bond
Sent: Wednesday, May 20, 2009 10:53 AM
To: vantage@yahoogroups .com
Subject: [Vantage] Re: Field calculation if-then statement for range
The calculated field you are creating in your BAQ has the data type of
string ?
--- In vantage@yahoogroups .com <mailto:vantage% 40yahoogroups. com> ,
"emverbeke" <emverbeke@. ..> wrote:
>without the parenthesis. It is a calculation on the
> That didn't work. I'm still getting an error. I tried it with and
QuoteHed.Confidence Pct field. So this is what I have.
> If QuoteHed.Confidence Pct <= .25 thenRobert Brown <robertb_versa@ > wrote:
> "25%"
> Else
> If QuoteHed.Confidence Pct <= .5 then
> "50%"
> Else
> If QuoteHed.Confidence Pct <= .75 then
> "75%"
> Else
> "100%"
> End.
> End.
> End.
>
> --- In vantage@yahoogroups .com <mailto:vantage% 40yahoogroups. com> ,
> >Progress 4GL Handbook has examples of nexted IF statements without using
> > It's a calc field using simple progress 4GL statements:
> >
> > (If yourtable.yourfield <= .25 then
> > "25%"
> > Else
> > (If yourtable.yourfield <= .5 then
> > "50%"
> > Else
> > (If yourtable.yourfield <= .75 then
> > "75%"
> > Else
> > "100%"
> > End.)
> > End.)
> > End.)
> >
> > Technically, I'm not sure you even need the parthensis. The OpenEdge
parenthesis. If you get an error when testing the BAQ, try it without.
> >place of a true table.field name. If you are actually calculating the
> > Also: For this simple example, I'm using yourtable.yourfield in
yourtable.yourfield value in another calculated field in your BAQ, you
can NOT reference that calculated field by name in another calculated
field.
> >statement above in place of yourtable.yourfield (at least on all
> > You would need to imbed that initial calculation within the
v8.03.305-405a versions I've used).
> >the true power of Progress. To get all of the power progress 4GL offers,
> > The BAQ editor is an extremely 'dumbed down' application that limits
you would have to purchase the progress development environment (for no
small fee!).
> >Microsoft (SQL Server) and even Oracle are (relative to each other in
> > This is why Progress is Progress (I fne RDMS & 4GL language) and
size) are who they are.
> >resources (TechNet) that is littered with free to use code examples &
> > Microsoft practically BEGS you to use their tremendous online
their development environments, while not free, are certainly not
financial back-breakers either.
> >are many things it can do in a single statement that require much more
> > That said, Progress IS and excellent engine and language... There
SQL equivalent result code.
> >confince percentage is between 1 and 25 to put 25 into a new field or if
> > Rob
> >
> >
> >
> >
> >
> > ____________ _________ _________ __
> > From: emverbeke <emverbeke@>
> > To: vantage@yahoogroups .com <mailto:vantage% 40yahoogroups. com>
> > Sent: Monday, May 18, 2009 10:47:19 AM
> > Subject: [Vantage] Field calculation if-then statement for range
> >
> >
> >
> >
> >
> > I'm working with a query and want to be able to say that if the
the percentage is 26-50 to put 50 and so on. I've looked t the 3643ESC
document as well as the 4GL book but I'm not have much luck. Any ideas?
> >[Non-text portions of this message have been removed]
> >
> >
> >
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
[Non-text portions of this message have been removed]