Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ignore text after the character = 1

Status
Not open for further replies.

ppark001

MIS
Jul 11, 2001
102
US
Crystal 8.5

My customer wants to enter text such as below. I need to ignore all text after the = sign. The equal sign is never in the same place.

"Here is an example = everything after the equal sign is to be ignored."

Thanks so much,

P.Park
 
Enter it into what?

Not providing basic technical information wastes time, you should include your software version, the database/connectivity being used, example data and expected output.

If a client is entering something into Crystal, then that means a parameter, which would make no sense because why enter it to then ignore it.

You probably mean that you have a field in a table that needs to be truncated AFTER the equal sign, so create a formula of:

left({table.field},instr({table.field},"="))

And use that in lieu of the field.

Please remember to use real technical terms and provide basic information in future posts.

If you do mean that they're going to enter something, please provide why they would enter it and then not display it. And if that is the case, use the above formula against the parameter.

The reason why the database is important to include is that you can likely use a SQL Expression (depending upon your software version, get the idea???) to have the database perform this function, which would prove faster.

-k
 
Thank you. The formula works perfect.

The database is Providex. It's a proprietary database for MAS200 Accounting Software from Sage Software. The data is entered into the software and appears in Crystal version 8.5 as a string.

Thanks again for your help.

P.Park
 
You might be able to use a SQL Expression, check if the Database->Show SQL Query exists, if so, you can probably do so to speed it up.

-k
 
No it does not. However, the speed is not an issue. I do have another question. The formula you provided includes the "=". I would like to only show the string to the left of the "=".

Thanks again!

P.Park
 
hi
try this then
right({table.field},instr({table.field},"="))


Durango122
Remember to used all fingers when waving to policemen :)
 
No, that does not work.

Here is the string with the 1st formula.

"Custom Hoods Description for customer to see ="

Here is the string with the 2nd formula.

"el = CONTINENTAL"

Here is the string with no formula.

"Custom Hoods Description for customer to see

=

American Range"

Thanks,

P.park

 
Use:

if left({table.field},instr({table.field},"=")) > 0 then
left({table.field},instr({table.field},"=")-1)
else
"N/A"

Your original post stated ignore after the = character.

-k
 
Thanks so much. I altered it a bit. This is what I am using:



if left({SO_21LineItemExtDescriptions.ExtdDesc1},instr({SO_21LineItemExtDescriptions.ExtdDesc1},"=")) > ""
then
left({SO_21LineItemExtDescriptions.ExtdDesc1},instr({SO_21LineItemExtDescriptions.ExtdDesc1},"=")-1)

else {SO_21LineItemExtDescriptions.ExtdDesc1}


 
Sorry, I should have posted:

if instr({SO_21LineItemExtDescriptions.ExtdDesc1},"=") > 0 then
left({SO_21LineItemExtDescriptions.ExtdDesc1},instr({SO_21LineItemExtDescriptions.ExtdDesc1},"=")-1)
else
{SO_21LineItemExtDescriptions.ExtdDesc1}

Same idea though...

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top