Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.
SRP_Array sort wiping variable
Issue with 2.0.2.RC8
ITEM=SRP_Array("SortRows",ITEM,"AL1",0)
Variable content is being lost
Text file to use is attached
ITEM=SRP_Array("SortRows",ITEM,"AL1",0)
Variable content is being lost
Text file to use is attached
Comments
Now : ITEM=SRP_Array("SortRows",ITEM,"AL1")
I copied the old format and omitted to remove the ,0
But same issue.
in the old format, there is the same result, or did 2.0.2.RC8 fix that
I then changed to the new format to see if that was any different, still failed.
Then removed the extra ",0" that should not have been there, still failed.
I have had RC8 in for a few weeks resolving a similar issue with Rotate Array, so expect something similar exists with Sort Array
Installed the RDK, copied the DLL in, and reran.
Same issue still there, although seeing a lot more @VMS
Tried both formats of the command.
I reviewed the data, and while it looks bizarre due to the thousands of empty values, I think it's correct. I used Rotate Array to look at the data, and it's definitely sorting on column 1, but you don't see anything useful until row 1897. There are a handful of rows at position 38. Granted, those should probably be sorted much lower, but can you agree that no algorithm is going to sort so much empty data in a way that is terribly useful? We are using the same data, right?
There was also a bug in my code, there was a field with more @vms than there should have been, which pushed all the data along, even though field 1, the sort field was limited. So when I looked in debug all I saw was @vms and did not scroll all the way to the right to see the data.
I now do a TrimTrailing on each @fm before sorting, and all now good
Thanks