BAQ calculated field

Hi Gerry,



Nice to hear from you again. This is a pretty good group isn't it?



Oops it was actually QuoteHed not OrderHed. I tried this and Vantage
gave me back a syntax error.



((if QuoteHed.CheckBox11 = true then "Please list mounting surface
details. " else "") +

(if QuoteHed.CheckBox12 = true then "Measure available wall space for
signage. " else "") )



I also tried creating a variable called Ck11 where I used

(if QuoteHed.CheckBox11 = true then "Please list mounting surface
details. " else "") and it worked ok.



Then I created a test variable where I used

Ck11 + 'test' and this returned "Please list mounting surface
details. test" which looked promising.



Then I created a Ck12 variable where I used

(if QuoteHed.CheckBox12 = true then 'Measure available wall space
for signage. " else "") and it worked ok.



Then I created a test variable where I used Ck11 + Ck12 which also gave
me a syntax error.



I also tried Ck11 + "" + Ck12 and Vantage didn't like that either. I
can use one calculated field in another, but not two.





Regards,

Linda



From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of Gerry Loranger
Sent: Tuesday, September 29, 2009 1:15 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] BAQ calculated field





As far as I know, you can't use a variable in a BAQ calculated column.
Please let me know if you can use a variable because that would be very
useful. But you could just assemble the string like this:

((if OrderHed.CheckBox01 = true then OrderHed.Character01 + " " else "")
+

(if OrderHed.CheckBox02 = true then OrderHed.Character02 + " " else ""))

From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On
Behalf Of
lindalowney
Sent: Tuesday, September 29, 2009 10:42 AM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
Subject: [Vantage] BAQ calculated field

We use OrderHed.CheckBox11 through OrderHed.CheckBox19 to indicate a
list of
instructions for our installers to do a site check. I would like to
create a
string that combines all the instructions.

In Basic I would do something like this:

dim SiteCkNotes as string
SiteCkNotes = ""
if OrderHed.CheckBox11 = true then
SiteCkNotes = SiteCkNotes & "Note number 11. "
endif
if OrderHed.CheckBox12 = true then
SiteCkNotes = SiteCkNotes & "Note number 12. "
endif

etc...

How do I do this in a calculated field in a BAQ?

Regards,
Linda

[Non-text portions of this message have been removed]





[Non-text portions of this message have been removed]
We use OrderHed.CheckBox11 through OrderHed.CheckBox19 to indicate a list of instructions for our installers to do a site check. I would like to create a string that combines all the instructions.

In Basic I would do something like this:

dim SiteCkNotes as string
SiteCkNotes = ""
if OrderHed.CheckBox11 = true then
SiteCkNotes = SiteCkNotes & "Note number 11. "
endif
if OrderHed.CheckBox12 = true then
SiteCkNotes = SiteCkNotes & "Note number 12. "
endif

etc...

How do I do this in a calculated field in a BAQ?

Regards,
Linda
Create a calc field SiteCkNotes

if OrderHed.CheckBox11 = "true" then SiteCkNotes + "Note number 11" else

if OrderHed.CheckBox12 = "true" then SiteCkNotes + "Note number 12" else

""



I am not sure if parenthesis are needed also...I have not done too many
large formulas yet...



This should be a start for you...Try one line at a time and use the
"analyze" and "test" option to see if it works



From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of lindalowney
Sent: Tuesday, September 29, 2009 9:42 AM
To: vantage@yahoogroups.com
Subject: [Vantage] BAQ calculated field





We use OrderHed.CheckBox11 through OrderHed.CheckBox19 to indicate a
list of instructions for our installers to do a site check. I would like
to create a string that combines all the instructions.

In Basic I would do something like this:

dim SiteCkNotes as string
SiteCkNotes = ""
if OrderHed.CheckBox11 = true then
SiteCkNotes = SiteCkNotes & "Note number 11. "
endif
if OrderHed.CheckBox12 = true then
SiteCkNotes = SiteCkNotes & "Note number 12. "
endif

etc...

How do I do this in a calculated field in a BAQ?

Regards,
Linda





[Non-text portions of this message have been removed]
As far as I know, you can't use a variable in a BAQ calculated column.
Please let me know if you can use a variable because that would be very
useful. But you could just assemble the string like this:



((if OrderHed.CheckBox01 = true then OrderHed.Character01 + " " else "") +

(if OrderHed.CheckBox02 = true then OrderHed.Character02 + " " else ""))







From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
lindalowney
Sent: Tuesday, September 29, 2009 10:42 AM
To: vantage@yahoogroups.com
Subject: [Vantage] BAQ calculated field





We use OrderHed.CheckBox11 through OrderHed.CheckBox19 to indicate a list of
instructions for our installers to do a site check. I would like to create a
string that combines all the instructions.

In Basic I would do something like this:

dim SiteCkNotes as string
SiteCkNotes = ""
if OrderHed.CheckBox11 = true then
SiteCkNotes = SiteCkNotes & "Note number 11. "
endif
if OrderHed.CheckBox12 = true then
SiteCkNotes = SiteCkNotes & "Note number 12. "
endif

etc...

How do I do this in a calculated field in a BAQ?

Regards,
Linda





[Non-text portions of this message have been removed]
At least in 8.03.4xx - can't use a variable in BAQs (based on my experience).

It's not a Progress limit - It's imposed by the dumbed down BAQ engine (or perhaps just the editor).

Rob Brown




________________________________
From: Gerry Loranger <gloranger@...>
To: vantage@yahoogroups.com
Sent: Tuesday, September 29, 2009 1:15:08 PM
Subject: RE: [Vantage] BAQ calculated field


As far as I know, you can't use a variable in a BAQ calculated column.
Please let me know if you can use a variable because that would be very
useful. But you could just assemble the string like this:

((if OrderHed.CheckBox01 = true then OrderHed.Character0 1 + " " else "") +

(if OrderHed.CheckBox02 = true then OrderHed.Character0 2 + " " else ""))

From: vantage@yahoogroups .com [mailto:vantage@yahoogroups .com] On Behalf Of
lindalowney
Sent: Tuesday, September 29, 2009 10:42 AM
To: vantage@yahoogroups .com
Subject: [Vantage] BAQ calculated field

We use OrderHed.CheckBox11 through OrderHed.CheckBox19 to indicate a list of
instructions for our installers to do a site check. I would like to create a
string that combines all the instructions.

In Basic I would do something like this:

dim SiteCkNotes as string
SiteCkNotes = ""
if OrderHed.CheckBox11 = true then
SiteCkNotes = SiteCkNotes & "Note number 11. "
endif
if OrderHed.CheckBox12 = true then
SiteCkNotes = SiteCkNotes & "Note number 12. "
endif

etc...

How do I do this in a calculated field in a BAQ?

Regards,
Linda

[Non-text portions of this message have been removed]







[Non-text portions of this message have been removed]