Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How do I reverse sort a path and skip the first level?
Ex Path = P1:P2:p3
I want to show P2:P1?
subfield('P1:P2:p3' , ':' , 2) & ':' & subfield('P1:P2:p3' , ':' , 1)
Or a more general solution:
Reversing:
load MyPath, concat(Element,':',-row) as Reversed Group by MyPath;
load MyPath, iterno() as row, subfield(MyPath,':',IterNo()) As Element
Inline [
MyPath
p1:p2:p3
p4:p5:p6:p7
p8:p9:p10:p11:p12
] While IterNo() <= SubStringCount(MyPath,':');
Hpw do I just reverse sort the string? is there a function?
Not as far as I know. You could use this to reverse a string:
Reversing:
load MyText, concat(Letter,'',-row) as Reversed Group by MyText;
load MyText, iterno() as row, mid(MyText,IterNo(),1) As Letter
Inline [
MyText
Testmystring
SecondTest
AnotherString
] While IterNo() <= len(MyText);