Joined: 12 Jun 2009
Online Status: Offline
Posts: 13
Topic: Sorting Data Posted: 29 Jul 2009 at 10:01am
I have some data that needs to be sorted. Unfortunately the data are strings of digits rather than numbers. For instance, if you tried sorting the following data by ascending, this is what would result.
12584443 258463
Obviously the first is larger than the latter. So I used the following to convert the digits to numbers:
If NumericText({TLORDER.BILL_NUMBER}[1 to 2]) Then ToNumber({TLORDER.BILL_NUMBER})
I used that code because some of the strings begin with letters rather than numbers. The problem is that all the strings that begin with letters are changed to 0. Does anyone know of an Else statement that would leave them unchanged? I know that's probably a simple thing to do, but I am rusty...
Joined: 12 Jun 2009
Online Status: Offline
Posts: 13
Posted: 29 Jul 2009 at 11:12am
Sorry I forgot to mention that. The letters will always be in the first or first and second positions in each string. I would like to sort my list as such. First I would like the lowest numeric values, followed by the strings starting with the lowest letters (A being the lowest, Z being the highest), followed by the strings that start with two letters. I would like the strings that start with two letters to be sorted by the lowest first letter and then the lowest second letter. All strings must be sorted by the lowest numerical values after the first one or two letters. For instance, here would be an ideal list:
I have to sort ascending order for Pending amount this is a formula field?how we can make ascending order for formula fields.please guide me ? we are using CR2008
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum