Calculated Field

Is there a reason you can't do it the other way?  Use the condition in Y and write it to Y when the X condition is true.

Ross
Is it possible to have a calculated field that assigns a value to another calculated field.

For example, I have a calculated field 'X' and 'Y'. In the X field it has a IFF statement. If that statement is true then I would like it to assign 'Y' a new value.

Is this possible?

Thanks,
Jasper




[Non-text portions of this message have been removed]
Depending on where you are doing this, you should be able to use nested
iff statements with only one calculated field.
Otherwise, Make the value of Y iif(x,new value,old calculated value).
Does this make sense?
Aaron Hoyt
Hittite Microwave

-----Original Message-----
From: Jasper Recto [mailto:jrecto@...]
Sent: Wednesday, September 29, 2004 3:51 PM
To: Vantage Groups (E-mail)
Subject: [Vantage] Calculated Field


Is it possible to have a calculated field that assigns a value
to another calculated field.

For example, I have a calculated field 'X' and 'Y'. In the X
field it has a IFF statement. If that statement is true then I would
like it to assign 'Y' a new value.

Is this possible?

Thanks,
Jasper




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



Useful links for the Yahoo!Groups Vantage Board are: ( Note:
You must have already linked your email address to a yahoo id to enable
access. )
(1) To access the Files Section of our Yahoo!Group for Report
Builder and Crystal Reports and other 'goodies', please goto:
http://groups.yahoo.com/group/vantage/files/.
(2) To search through old msg's goto:
http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto:
http://groups.yahoo.com/group/vantage/links



Yahoo! Groups Sponsor
ADVERTISEMENT
click here
<http://us.ard.yahoo.com/SIG=1291opfl7/M=295196.4901138.6071305.3001176/
D=groups/S=1705007183:HM/EXP=1096573883/A=2128215/R=0/SIG=10se96mf6/*htt
p://companion.yahoo.com>

<http://us.adserver.yahoo.com/l?M=295196.4901138.6071305.3001176/D=group
s/S=:HM/A=2128215/rand=768141557>


________________________________

Yahoo! Groups Links


* To visit your group on the web, go to:
http://groups.yahoo.com/group/vantage/

* To unsubscribe from this group, send an email to:
vantage-unsubscribe@yahoogroups.com
<mailto:vantage-unsubscribe@yahoogroups.com?subject=Unsubscribe>

* Your use of Yahoo! Groups is subject to the Yahoo! Terms
of Service <http://docs.yahoo.com/info/terms/> .




[Non-text portions of this message have been removed]
If your working in Crystal you might be able to use a case statement.
Example below from Crystal help

This formula groups the number of Oscar nominations a movie received into
low, medium, high or extreme categories and in the process, shows some of
the possibilities for the expression lists following the Case labels:
BM_147518//Select example 2

BM_147519Select {movie.NOM}

BM_147520 Case 1,2,3, Is < 1 :

BM_147521 (

BM_147522 //Can have expression lists by using

BM_147523 //parentheses

BM_147524 10 + 20;

BM_147525 "low"

BM_147526 )

BM_147527 Case 4 To 6, 7, 8, 9 :

BM_147528 "medium"

BM_147529 Case 10 :

BM_147530 "high"

BM_147531 Default :

BM_147532 "extreme"


Dan Shallbetter
States Electric Mfg.




-----Original Message-----
From: Aaron Hoyt [mailto:hoyt@...]
Sent: Wednesday, September 29, 2004 2:59 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Calculated Field


Depending on where you are doing this, you should be able to use nested
iff statements with only one calculated field.
Otherwise, Make the value of Y iif(x,new value,old calculated value).
Does this make sense?
Aaron Hoyt
Hittite Microwave

-----Original Message-----
From: Jasper Recto [mailto:jrecto@...]
Sent: Wednesday, September 29, 2004 3:51 PM
To: Vantage Groups (E-mail)
Subject: [Vantage] Calculated Field


Is it possible to have a calculated field that assigns a value
to another calculated field.

For example, I have a calculated field 'X' and 'Y'. In the X
field it has a IFF statement. If that statement is true then I would
like it to assign 'Y' a new value.

Is this possible?

Thanks,
Jasper







[Non-text portions of this message have been removed]
I'm a little lost.

-----Original Message-----
From: Aaron Hoyt [mailto:hoyt@...]
Sent: Wednesday, September 29, 2004 3:59 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Calculated Field



Depending on where you are doing this, you should be able to use nested
iff statements with only one calculated field.
Otherwise, Make the value of Y iif(x,new value,old calculated value).
Does this make sense?
Aaron Hoyt
Hittite Microwave

-----Original Message-----
From: Jasper Recto [mailto:jrecto@...]
Sent: Wednesday, September 29, 2004 3:51 PM
To: Vantage Groups (E-mail)
Subject: [Vantage] Calculated Field


Is it possible to have a calculated field that assigns a value
to another calculated field.

For example, I have a calculated field 'X' and 'Y'. In the X
field it has a IFF statement. If that statement is true then I would
like it to assign 'Y' a new value.

Is this possible?

Thanks,
Jasper




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



Useful links for the Yahoo!Groups Vantage Board are: ( Note:
You must have already linked your email address to a yahoo id to enable
access. )
(1) To access the Files Section of our Yahoo!Group for Report
Builder and Crystal Reports and other 'goodies', please goto:
http://groups.yahoo.com/group/vantage/files/.
(2) To search through old msg's goto:
http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto:
http://groups.yahoo.com/group/vantage/links



Yahoo! Groups Sponsor
ADVERTISEMENT
click here
<http://us.ard.yahoo.com/SIG=1291opfl7/M=295196.4901138.6071305.3001176/
D=groups/S=1705007183:HM/EXP=1096573883/A=2128215/R=0/SIG=10se96mf6/*htt
p://companion.yahoo.com>

<http://us.adserver.yahoo.com/l?M=295196.4901138.6071305.3001176/D=group
s/S=:HM/A=2128215/rand=768141557>


________________________________

Yahoo! Groups Links


* To visit your group on the web, go to:
http://groups.yahoo.com/group/vantage/

* To unsubscribe from this group, send an email to:
vantage-unsubscribe@yahoogroups.com
<mailto:vantage-unsubscribe@yahoogroups.com?subject=Unsubscribe>

* Your use of Yahoo! Groups is subject to the Yahoo! Terms
of Service <http://docs.yahoo.com/info/terms/> .




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




Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and Crystal Reports and other 'goodies', please goto: http://groups.yahoo.com/group/vantage/files/.
(2) To search through old msg's goto: http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto: http://groups.yahoo.com/group/vantage/links
Yahoo! Groups Links
Opps, it appears that when I pasted the example from Crystal it inserted
some hidden code? Please ignore the BM_147??? fields.
I will now go to my corner.

Dan Shallbetter
States Electric Mfg.

-----Original Message-----
From: Dan Shallbetter [mailto:dans@...]
Sent: Wednesday, September 29, 2004 3:12 PM
To: 'vantage@yahoogroups.com'
Subject: RE: [Vantage] Calculated Field


If your working in Crystal you might be able to use a case statement.
Example below from Crystal help

This formula groups the number of Oscar nominations a movie received into
low, medium, high or extreme categories and in the process, shows some of
the possibilities for the expression lists following the Case labels:
BM_147518//Select example 2

BM_147519Select {movie.NOM}

BM_147520 Case 1,2,3, Is < 1 :

BM_147521 (

BM_147522 //Can have expression lists by using

BM_147523 //parentheses

BM_147524 10 + 20;

BM_147525 "low"

BM_147526 )

BM_147527 Case 4 To 6, 7, 8, 9 :

BM_147528 "medium"

BM_147529 Case 10 :

BM_147530 "high"

BM_147531 Default :

BM_147532 "extreme"


Dan Shallbetter
States Electric Mfg.




-----Original Message-----
From: Aaron Hoyt [mailto:hoyt@...]
Sent: Wednesday, September 29, 2004 2:59 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Calculated Field


Depending on where you are doing this, you should be able to use nested
iff statements with only one calculated field.
Otherwise, Make the value of Y iif(x,new value,old calculated value).
Does this make sense?
Aaron Hoyt
Hittite Microwave

-----Original Message-----
From: Jasper Recto [mailto:jrecto@...]
Sent: Wednesday, September 29, 2004 3:51 PM
To: Vantage Groups (E-mail)
Subject: [Vantage] Calculated Field


Is it possible to have a calculated field that assigns a value
to another calculated field.

For example, I have a calculated field 'X' and 'Y'. In the X
field it has a IFF statement. If that statement is true then I would
like it to assign 'Y' a new value.

Is this possible?

Thanks,
Jasper










[Non-text portions of this message have been removed]
Are you in Crystal or RB for this?
Can you provide an example of the statement in 'X'? With that I can be
a little more clear.
Aaron

-----Original Message-----
From: Jasper Recto [mailto:jrecto@...]
Sent: Wednesday, September 29, 2004 4:12 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Calculated Field


I'm a little lost.

-----Original Message-----
From: Aaron Hoyt [mailto:hoyt@...]
Sent: Wednesday, September 29, 2004 3:59 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Calculated Field



Depending on where you are doing this, you should be able to use
nested
iff statements with only one calculated field.
Otherwise, Make the value of Y iif(x,new value,old calculated
value).
Does this make sense?
Aaron Hoyt
Hittite Microwave

-----Original Message-----
From: Jasper Recto [mailto:jrecto@...]
Sent: Wednesday, September 29, 2004 3:51 PM
To: Vantage Groups (E-mail)
Subject: [Vantage] Calculated Field


Is it possible to have a calculated field that assigns a
value
to another calculated field.

For example, I have a calculated field 'X' and 'Y'. In
the X
field it has a IFF statement. If that statement is true then I
would
like it to assign 'Y' a new value.

Is this possible?

Thanks,
Jasper




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



Useful links for the Yahoo!Groups Vantage Board are: (
Note:
You must have already linked your email address to a yahoo id to
enable
access. )
(1) To access the Files Section of our Yahoo!Group for
Report
Builder and Crystal Reports and other 'goodies', please goto:
http://groups.yahoo.com/group/vantage/files/.
(2) To search through old msg's goto:
http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services
goto:
http://groups.yahoo.com/group/vantage/links



Yahoo! Groups Sponsor
ADVERTISEMENT
click here

<http://us.ard.yahoo.com/SIG=1291opfl7/M=295196.4901138.6071305.3001176/

D=groups/S=1705007183:HM/EXP=1096573883/A=2128215/R=0/SIG=10se96mf6/*htt
p://companion.yahoo.com>


<http://us.adserver.yahoo.com/l?M=295196.4901138.6071305.3001176/D=group
s/S=:HM/A=2128215/rand=768141557>


________________________________

Yahoo! Groups Links


* To visit your group on the web, go to:
http://groups.yahoo.com/group/vantage/

* To unsubscribe from this group, send an email to:
vantage-unsubscribe@yahoogroups.com
<mailto:vantage-unsubscribe@yahoogroups.com?subject=Unsubscribe>


* Your use of Yahoo! Groups is subject to the Yahoo!
Terms
of Service <http://docs.yahoo.com/info/terms/> .




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




Useful links for the Yahoo!Groups Vantage Board are: ( Note:
You must have already linked your email address to a yahoo id to enable
access. )
(1) To access the Files Section of our Yahoo!Group for Report
Builder and Crystal Reports and other 'goodies', please goto:
http://groups.yahoo.com/group/vantage/files/.
(2) To search through old msg's goto:
http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto:
http://groups.yahoo.com/group/vantage/links
Yahoo! Groups Links









Useful links for the Yahoo!Groups Vantage Board are: ( Note:
You must have already linked your email address to a yahoo id to enable
access. )
(1) To access the Files Section of our Yahoo!Group for Report
Builder and Crystal Reports and other 'goodies', please goto:
http://groups.yahoo.com/group/vantage/files/.
(2) To search through old msg's goto:
http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto:
http://groups.yahoo.com/group/vantage/links



Yahoo! Groups Sponsor
ADVERTISEMENT
click here
<http://us.ard.yahoo.com/SIG=129ds19lh/M=295196.4901138.6071305.3001176/
D=groups/S=1705007183:HM/EXP=1096575143/A=2128215/R=0/SIG=10se96mf6/*htt
p://companion.yahoo.com>

<http://us.adserver.yahoo.com/l?M=295196.4901138.6071305.3001176/D=group
s/S=:HM/A=2128215/rand=659233928>


________________________________

Yahoo! Groups Links


* To visit your group on the web, go to:
http://groups.yahoo.com/group/vantage/

* To unsubscribe from this group, send an email to:
vantage-unsubscribe@yahoogroups.com
<mailto:vantage-unsubscribe@yahoogroups.com?subject=Unsubscribe>

* Your use of Yahoo! Groups is subject to the Yahoo! Terms
of Service <http://docs.yahoo.com/info/terms/> .




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

Ok, I am not an expert with writting these, however I eventually get them to work. The syntax below is working for me, however I am trying to get "Late" to show up when ShipDtl.ShipCmpl <> True. Instead, I get '30000'. I can live with this and move on. I am really just wondering why I can't get the word "Late" to list. If I do insert "Late" in place of '00000', '10000', '20000', or '30000' the field is blank

IF ShipDtl.ShipCmpl = True
THEN
IF OrderRel.ReqDate <> OrderRel.NeedByDate
THEN ShipHead.ShipDate - OrderRel.NeedByDate
ELSE
IF ShipDtl.ShipCmpl = True
THEN
IF OrderRel.ReqDate = OrderRel.NeedByDate
THEN ShipHead.ShipDate - OrderRel.NeedByDate
ELSE
IF ShipDtl.ShipCmpl <> True
THEN '00000'
ELSE '10000'
ELSE '20000'
Else '30000'
Is the calculated field data type CHARACTER? If not, try that and see if
that makes a difference.

Ross

-----Original Message-----
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
jplehr
Sent: Thursday, September 10, 2009 2:50 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Calculated Field

Vantage 8.03.408A

Ok, I am not an expert with writting these, however I eventually get them to
work. The syntax below is working for me, however I am trying to get "Late"
to show up when ShipDtl.ShipCmpl <> True. Instead, I get '30000'. I can live
with this and move on. I am really just wondering why I can't get the word
"Late" to list. If I do insert "Late" in place of '00000', '10000', '20000',
or '30000' the field is blank

IF ShipDtl.ShipCmpl = True
THEN
IF OrderRel.ReqDate <> OrderRel.NeedByDate
THEN ShipHead.ShipDate - OrderRel.NeedByDate
ELSE
IF ShipDtl.ShipCmpl = True
THEN
IF OrderRel.ReqDate = OrderRel.NeedByDate
THEN ShipHead.ShipDate - OrderRel.NeedByDate
ELSE
IF ShipDtl.ShipCmpl <> True
THEN '00000'
ELSE '10000'
ELSE '20000'
Else '30000'




------------------------------------

Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have
already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and
Crystal Reports and other 'goodies', please goto:
http://groups.yahoo.com/group/vantage/files/.
(2) To search through old msg's goto:
http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto:
http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
Yes, it is CHARACTER. I have tried other combinations just in case.

Jeff
--- In vantage@yahoogroups.com, "Ross Hughes" <ross.hughes@...> wrote:
>
> Is the calculated field data type CHARACTER? If not, try that and see if
> that makes a difference.
>
> Ross
>
> -----Original Message-----
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
> jplehr
> Sent: Thursday, September 10, 2009 2:50 PM
> To: vantage@yahoogroups.com
> Subject: [Vantage] Calculated Field
>
> Vantage 8.03.408A
>
> Ok, I am not an expert with writting these, however I eventually get them to
> work. The syntax below is working for me, however I am trying to get "Late"
> to show up when ShipDtl.ShipCmpl <> True. Instead, I get '30000'. I can live
> with this and move on. I am really just wondering why I can't get the word
> "Late" to list. If I do insert "Late" in place of '00000', '10000', '20000',
> or '30000' the field is blank
>
> IF ShipDtl.ShipCmpl = True
> THEN
> IF OrderRel.ReqDate <> OrderRel.NeedByDate
> THEN ShipHead.ShipDate - OrderRel.NeedByDate
> ELSE
> IF ShipDtl.ShipCmpl = True
> THEN
> IF OrderRel.ReqDate = OrderRel.NeedByDate
> THEN ShipHead.ShipDate - OrderRel.NeedByDate
> ELSE
> IF ShipDtl.ShipCmpl <> True
> THEN '00000'
> ELSE '10000'
> ELSE '20000'
> Else '30000'
>
>
>
>
> ------------------------------------
>
> Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have
> already linked your email address to a yahoo id to enable access. )
> (1) To access the Files Section of our Yahoo!Group for Report Builder and
> Crystal Reports and other 'goodies', please goto:
> http://groups.yahoo.com/group/vantage/files/.
> (2) To search through old msg's goto:
> http://groups.yahoo.com/group/vantage/messages
> (3) To view links to Vendors that provide Vantage services goto:
> http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
>
I think I see the problem, the very first "Then" returns the difference between two dates. The system is now expecting a number to be returned and even though you have set the field to character, it still wants a number returned which it will then convert to character. Since 'LATE' can not be converted to a number, the end result is a null or empty string. Try this instead:

IF ShipDtl.ShipCmpl = True
THEN
IF OrderRel.ReqDate <> OrderRel.NeedByDate
THEN STRING(ShipHead.ShipDate - OrderRel.NeedByDate)
ELSE
IF ShipDtl.ShipCmpl = True
THEN
IF OrderRel.ReqDate = OrderRel.NeedByDate
THEN STRING(ShipHead.ShipDate - OrderRel.NeedByDate)
ELSE
IF ShipDtl.ShipCmpl <> True
THEN '00000'
ELSE '10000'
ELSE '20000'
Else 'LATE'





________________________________
From: jplehr <jlehr@...>
To: vantage@yahoogroups.com
Sent: Thursday, September 10, 2009 4:05:11 PM
Subject: [Vantage] Re: Calculated Field

Â
Yes, it is CHARACTER. I have tried other combinations just in case.

Jeff
--- In vantage@yahoogroups .com, "Ross Hughes" <ross.hughes@ ...> wrote:
>
> Is the calculated field data type CHARACTER? If not, try that and see if
> that makes a difference.
>
> Ross
>
> -----Original Message-----
> From: vantage@yahoogroups .com [mailto:vantage@yahoogroups .com] On Behalf Of
> jplehr
> Sent: Thursday, September 10, 2009 2:50 PM
> To: vantage@yahoogroups .com
> Subject: [Vantage] Calculated Field
>
> Vantage 8.03.408A
>
> Ok, I am not an expert with writting these, however I eventually get them to
> work. The syntax below is working for me, however I am trying to get "Late"
> to show up when ShipDtl.ShipCmpl <> True. Instead, I get '30000'. I can live
> with this and move on. I am really just wondering why I can't get the word
> "Late" to list. If I do insert "Late" in place of '00000', '10000', '20000',
> or '30000' the field is blank
>
> IF ShipDtl.ShipCmpl = True
> THEN
> IF OrderRel.ReqDate <> OrderRel.NeedByDate
> THEN ShipHead.ShipDate - OrderRel.NeedByDate
> ELSE
> IF ShipDtl.ShipCmpl = True
> THEN
> IF OrderRel.ReqDate = OrderRel.NeedByDate
> THEN ShipHead.ShipDate - OrderRel.NeedByDate
> ELSE
> IF ShipDtl.ShipCmpl <> True
> THEN '00000'
> ELSE '10000'
> ELSE '20000'
> Else '30000'
>
>
>
>
> ------------ --------- --------- ------
>
> Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have
> already linked your email address to a yahoo id to enable access. )
> (1) To access the Files Section of our Yahoo!Group for Report Builder and
> Crystal Reports and other 'goodies', please goto:
> http://groups. yahoo.com/ group/vantage/ files/.
> (2) To search through old msg's goto:
> http://groups. yahoo.com/ group/vantage/ messages
> (3) To view links to Vendors that provide Vantage services goto:
> http://groups. yahoo.com/ group/vantage/ linksYahoo! Groups Links
>







[Non-text portions of this message have been removed]
Thanks Steve. Adding "STRING" did take care of my issue. Working perfectly now. Also, I would like to thank you for the clear explanation as to why the system was reading and expecting the information as it was. That allowed me to modify the statement further and I believe, make it better.

I appreciate the help.

Jeff

--- In vantage@yahoogroups.com, Steven Gotschall <sgotschall@...> wrote:
>
> I think I see the problem, the very first "Then" returns the difference between two dates. The system is now expecting a number to be returned and even though you have set the field to character, it still wants a number returned which it will then convert to character. Since 'LATE' can not be converted to a number, the end result is a null or empty string. Try this instead:
>
> IF ShipDtl.ShipCmpl = True
> THEN
> IF OrderRel.ReqDate <> OrderRel.NeedByDate
> THEN STRING(ShipHead.ShipDate - OrderRel.NeedByDate)
> ELSE
> IF ShipDtl.ShipCmpl = True
> THEN
> IF OrderRel.ReqDate = OrderRel.NeedByDate
> THEN STRING(ShipHead.ShipDate - OrderRel.NeedByDate)
> ELSE
> IF ShipDtl.ShipCmpl <> True
> THEN '00000'
> ELSE '10000'
> ELSE '20000'
> Else 'LATE'
>
>
>
>
>
> ________________________________
> From: jplehr <jlehr@...>
> To: vantage@yahoogroups.com
> Sent: Thursday, September 10, 2009 4:05:11 PM
> Subject: [Vantage] Re: Calculated Field
>
> Â
> Yes, it is CHARACTER. I have tried other combinations just in case.
>
> Jeff
> --- In vantage@yahoogroups .com, "Ross Hughes" <ross.hughes@ ...> wrote:
> >
> > Is the calculated field data type CHARACTER? If not, try that and see if
> > that makes a difference.
> >
> > Ross
> >
> > -----Original Message-----
> > From: vantage@yahoogroups .com [mailto:vantage@yahoogroups .com] On Behalf Of
> > jplehr
> > Sent: Thursday, September 10, 2009 2:50 PM
> > To: vantage@yahoogroups .com
> > Subject: [Vantage] Calculated Field
> >
> > Vantage 8.03.408A
> >
> > Ok, I am not an expert with writting these, however I eventually get them to
> > work. The syntax below is working for me, however I am trying to get "Late"
> > to show up when ShipDtl.ShipCmpl <> True. Instead, I get '30000'. I can live
> > with this and move on. I am really just wondering why I can't get the word
> > "Late" to list. If I do insert "Late" in place of '00000', '10000', '20000',
> > or '30000' the field is blank
> >
> > IF ShipDtl.ShipCmpl = True
> > THEN
> > IF OrderRel.ReqDate <> OrderRel.NeedByDate
> > THEN ShipHead.ShipDate - OrderRel.NeedByDate
> > ELSE
> > IF ShipDtl.ShipCmpl = True
> > THEN
> > IF OrderRel.ReqDate = OrderRel.NeedByDate
> > THEN ShipHead.ShipDate - OrderRel.NeedByDate
> > ELSE
> > IF ShipDtl.ShipCmpl <> True
> > THEN '00000'
> > ELSE '10000'
> > ELSE '20000'
> > Else '30000'
> >
> >
> >
> >
> > ------------ --------- --------- ------
> >
> > Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have
> > already linked your email address to a yahoo id to enable access. )
> > (1) To access the Files Section of our Yahoo!Group for Report Builder and
> > Crystal Reports and other 'goodies', please goto:
> > http://groups. yahoo.com/ group/vantage/ files/.
> > (2) To search through old msg's goto:
> > http://groups. yahoo.com/ group/vantage/ messages
> > (3) To view links to Vendors that provide Vantage services goto:
> > http://groups. yahoo.com/ group/vantage/ linksYahoo! Groups Links
> >
>
>
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
I need to create a calculated field in a BAQ.  I need to take a date field and add days to it.  But I don't know if I can just do that or need special formatting.
 
Thanks

You can try:

 

DATEADD (day, 1, yourdate)

 

Brenda

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Monday, December 21, 2015 11:25 AM
To: yahoogroups
Subject: [Vantage] Calculated Field

 

 

I need to create a calculated field in a BAQ.  I need to take a date field and add days to it.  But I don't know if I can just do that or need special formatting.

 

Thanks

These are from an answerbook on baq calculations.

 

Greg

 

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Example # 7: To subtract two date fields you need to convert them to integers first. Note: for this example, set the data type to integer and the format to

>>>,>>9.

 

(integer(ShipHead.ShipDate) - integer(OrderRel.ReqDate))

 

 

 

Example # 6: To create a MonthYear field. You will need use both a concatenation and a string function. To do a concatenation use the + symbol. Use the string as the "outer function. Note: for this example you must set the data type to Character and the format to X(7).

 

string(Month(OrderHed.OrderDate), "99") + "-" + string(Year(OrderHed.OrderDate), "9999")

 

***For SQL where you want to display the Period use this syntax:

entry( Month(OrderHed.OrderDate),'01,02,03,04,05,06,07,08,09,10,11,12', ',') + "-" + tring(Year(OrderHed.OrderDate), "9999")

 

Example # 6.1: How to change format of Todays date to MMDDYYYY

 

String( Month(Today),"99") + "/" + String( Day(Today),"99") + "/" + string(Year(Today),"9999" )

 

- data type is character, format is x(10)

 

Example 6.2: How to change Todays date to format YYYMMDD

 

string(Year(Today),"9999" ) + "/" + String( Month(Today),"99") + "/" + String( Day(Today),"99")

 

- data type is character, format is x(10)

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Monday, December 21, 2015 11:25 AM
To: yahoogroups
Subject: [Vantage] Calculated Field

 

 

I need to create a calculated field in a BAQ.  I need to take a date field and add days to it.  But I don't know if I can just do that or need special formatting.

 

Thanks




CONFIDENTIALITY NOTICE

The information contained in this communication, including attachments, is privileged and confidential. It is intended only for the exclusive use of the addressee. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us at 727-578-6240 and immediately delete the communication.

"This (document/presentation) may contain technical data as defined in the International Traffic In Arms Regulations (ITAR) 22 CFR 120.10. Export of this material is restricted by the Arms Export Control Act (22 U.S.C. 2751 et seq.) and may not be exported to foreign persons without prior approval form the U.S. Department of State."