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!

Sort on string field which starts with both number and character 1

Status
Not open for further replies.

vega83

Programmer
Jun 12, 2008
141
US
Friends I have field which has values 01EE013,LANE215, etc

I have 5 different sort slection in paramter

If {?Sort} = 1 then tonumber({Command.STORE})
else If {?Sort} = 2 then tonumber(left({Command.LOCN},1))
else If {?Sort} = 3 then {@rdays1}
else If {?Sort} = 4 then {@tdays1}

sort is numeric parameter

sort works fine when Command.LOCN} starts with numeber but fails when starts with A or B or C.
Any help or ideas?

Thans a lot.
V
 
I have foud a solution
if left({Command.LOCN},1) in ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","W","X","Y", "Z"]

then "9" else left({Command.LOCN},1)

this is working for me:). Let me know if there are better solutions
 
if not isnumeric(left({Command.LOCN},1)) then......

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"What version of URGENT!!! are you using?
 
Thats a pretty nice trick thanks dgillz !
V
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top