I ended up using Mid(ExtractString ({shipdtl.ORDRELREF},"", "*"),4)
Sarah helped figure out I needed the "ExtractString" function to get the
field to truncate after the *. I really appreciate those who assisted.
Thank you,
Bruce Butler
IT Manager
Knappe & Koester, Inc.
_____
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of Gerard Wadman
Sent: Thursday, April 26, 2007 1:35 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Truncated Strings in crystal
Bruce, If I were to assume that "BB" would be the starting point of your
string and you wanted a finite amount of characters to appear afterwards
then I would use the following formula.
Mid([TableName]![FieldName], InStr([TableName]![FieldName],"B"),5)
The result of this would be an output staring with the first "B" it
finds in the string and continuing for a total of five characters.
For Example, if the Table Name was Tab1 and the Field Name was SN and
the field data ="179QBB23456789"
The Formula: Mid([Tab1]![SN], InStr([Tab1]![SN],"B"),5 would
result in "BB234"
I hope this helps.
________________________________
From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On
Behalf
Of Bruce Butler
Sent: Thursday, April 26, 2007 9:51 AM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
Subject: RE: [Vantage] Truncated Strings in crystal
That is not quite what I am looking for. The * could be further in /
out, and not necessarily at 5 positions.
Bruce Butler
IT Manager
Knappe & Koester, Inc.
_____
From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com> ] On
Behalf
Of RICH WAGNER
Sent: Thursday, April 26, 2007 9:36 AM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>
Subject: RE: [Vantage] Truncated Strings in crystal
You can use the Left function.
Left ({table.field},5)
This will do it
Rich
_____
From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com> ] On
Behalf
Of Bruce Butler
Sent: Wednesday, April 25, 2007 4:40 PM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>
Subject: [Vantage] Truncated Strings in crystal
Does anyone know off hand how to truncate a string after a certain
character from within Crystal? Basically what I would like is the
following;
Ex.
StringFunction( "BB123* this is some extra text", '*' ) that would
return the value 'BB123'.
I expect there is a function to take care of that similar to how the
truncate function works with numbers, I just cannot find it.
Thank you,
Bruce Butler, IT Manager
Knappe & Koester, Inc. <http://www.knappe-koester.com
<http://www.knappe-koester.com>
<http://www.knappe-koester.com <http://www.knappe-koester.com> >
<http://www.knappe-koester.com <http://www.knappe-koester.com>
<http://www.knappe-koester.com <http://www.knappe-koester.com> > >
<http://www.knappe-koester.com <http://www.knappe-koester.com>
<http://www.knappe-koester.com <http://www.knappe-koester.com> >
<http://www.knappe-koester.com <http://www.knappe-koester.com>
<http://www.knappe-koester.com <http://www.knappe-koester.com> > > > >
18 Bradco Street
Keene, NH
p. 603-355-1166
f. 603-355-2266
bbutler@... <mailto:bbutler%40knappe-koester.com>
<mailto:bbutler%40knappe-koester.com>
<mailto:bbutler%40knappe-koester.com>
<mailto:bbutler%40knappe-koester.com>
The information in this message is proprietary and/or confidential and
is intended only for the use of the individual(s) named above. This
message should not be forwarded without permission from the author. If
this message is received in error or otherwise by someone other than the
addressee, please contact the author at the above number and return the
message or destroy it. In addition, the recipient of this data agrees to
abide by the United States Export Control of Technical Data and
Equipment under the International Traffic in Arms Regulations (ITAR) and
Export Administration Regulations (EAR). The recipient agrees to abide
by these laws and their regulations not only for export and re-export,
but for disclosure to non-U.S. citizens.
[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]
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
Sarah helped figure out I needed the "ExtractString" function to get the
field to truncate after the *. I really appreciate those who assisted.
Thank you,
Bruce Butler
IT Manager
Knappe & Koester, Inc.
_____
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of Gerard Wadman
Sent: Thursday, April 26, 2007 1:35 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Truncated Strings in crystal
Bruce, If I were to assume that "BB" would be the starting point of your
string and you wanted a finite amount of characters to appear afterwards
then I would use the following formula.
Mid([TableName]![FieldName], InStr([TableName]![FieldName],"B"),5)
The result of this would be an output staring with the first "B" it
finds in the string and continuing for a total of five characters.
For Example, if the Table Name was Tab1 and the Field Name was SN and
the field data ="179QBB23456789"
The Formula: Mid([Tab1]![SN], InStr([Tab1]![SN],"B"),5 would
result in "BB234"
I hope this helps.
________________________________
From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On
Behalf
Of Bruce Butler
Sent: Thursday, April 26, 2007 9:51 AM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
Subject: RE: [Vantage] Truncated Strings in crystal
That is not quite what I am looking for. The * could be further in /
out, and not necessarily at 5 positions.
Bruce Butler
IT Manager
Knappe & Koester, Inc.
_____
From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com> ] On
Behalf
Of RICH WAGNER
Sent: Thursday, April 26, 2007 9:36 AM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>
Subject: RE: [Vantage] Truncated Strings in crystal
You can use the Left function.
Left ({table.field},5)
This will do it
Rich
_____
From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com> ] On
Behalf
Of Bruce Butler
Sent: Wednesday, April 25, 2007 4:40 PM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>
Subject: [Vantage] Truncated Strings in crystal
Does anyone know off hand how to truncate a string after a certain
character from within Crystal? Basically what I would like is the
following;
Ex.
StringFunction( "BB123* this is some extra text", '*' ) that would
return the value 'BB123'.
I expect there is a function to take care of that similar to how the
truncate function works with numbers, I just cannot find it.
Thank you,
Bruce Butler, IT Manager
Knappe & Koester, Inc. <http://www.knappe-koester.com
<http://www.knappe-koester.com>
<http://www.knappe-koester.com <http://www.knappe-koester.com> >
<http://www.knappe-koester.com <http://www.knappe-koester.com>
<http://www.knappe-koester.com <http://www.knappe-koester.com> > >
<http://www.knappe-koester.com <http://www.knappe-koester.com>
<http://www.knappe-koester.com <http://www.knappe-koester.com> >
<http://www.knappe-koester.com <http://www.knappe-koester.com>
<http://www.knappe-koester.com <http://www.knappe-koester.com> > > > >
18 Bradco Street
Keene, NH
p. 603-355-1166
f. 603-355-2266
bbutler@... <mailto:bbutler%40knappe-koester.com>
<mailto:bbutler%40knappe-koester.com>
<mailto:bbutler%40knappe-koester.com>
<mailto:bbutler%40knappe-koester.com>
The information in this message is proprietary and/or confidential and
is intended only for the use of the individual(s) named above. This
message should not be forwarded without permission from the author. If
this message is received in error or otherwise by someone other than the
addressee, please contact the author at the above number and return the
message or destroy it. In addition, the recipient of this data agrees to
abide by the United States Export Control of Technical Data and
Equipment under the International Traffic in Arms Regulations (ITAR) and
Export Administration Regulations (EAR). The recipient agrees to abide
by these laws and their regulations not only for export and re-export,
but for disclosure to non-U.S. citizens.
[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]
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]