3.2.0

Sorting Alphanumeric grid values

Hi Alex,

I am trying to sort a particular column which sorts (Ascending , Descending) but it is not able to sort the -ve values . Ex: In a column i have values like {230,90 USD, -10 USD , 0.00 USD} after sorting ascending its displaying the values 0.00 , -10 USD , 230.90 USD . Here is the code what i am using..

if(typeof(a)!=typeof(b)){
x=types[typeof(a)];
y=types[typeof(b)];
if(x > y){
return greater}
if(x < y){return less}
if(x==y){return equal(i,j)} //Added to fix Defect#WNet00014685
}
//If both the values are numeric
else if(typeof(a)=="number"){
if(a > b){
return greater}
if(a < b){
return less}
if(a==b){return equal(i,j)} //Added to fix Defect#WNet00014685
}

// If both the values are alpha-numeric
else{
return(greater *((""+a).localeCompare(b)))|| equal(i,j)
}
Umesh
July 23,

This topic is archived.

See also:


Back to support forum