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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Modifying code

Status
Not open for further replies.

ptrifile

Technical User
Aug 10, 2004
457
US
I am using the following code to take and combine values from:

BBuy HT T1
BBuy PC T1
BBuy HT T2
BBuy PC T2


to

T1
T2

Code:
stringvar array x := split({splitTable1.Split_Name}," ");
x[ubound(x)]

how would i change that code to change the following from:

BBuy T1A Tfr
BBuy T1A Field
BBuy T2A Tfr
BBuy T2A Field

to

T1
T2

Thanks for any help

Paul
 
If you literally only want to check those two codes, you can use:

if "T1" in {table.field} then "T1" else
if "T2" in {table.field} then "T2" else
{table.field}

-LB
 
If the text you want is always the second block after a space and comprises two characters.


left(split({YourString}, " ")[2],2)

Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top