× Discuss on Template programming, jBASE programming, Enquiries, No-File enquiry, Enquiry routines, Version, Version routines, Menus, Abbriviations, Creating local reference fields, Fast path enquiries, Creating charts and graphs, Generating Reports, Deal slips, Straight through processing, Multi Company and Multi Book setup, Tabbed screens, Composite Screens, T24 API, etc...

SORT fn not works as expected

  • baskarjay
  • baskarjay's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
6 years 9 months ago #21950 by baskarjay
SORT fn not works as expected was created by baskarjay
Dear All,

My array contains like 11, 1, 111, 222, 2, 22

SORT works like 1, 11, 111, 2, 22, 222 ...

But i need output like 1, 2, 11, 22, 111, 222 ...

is there any API for this kind of sorting ?????????????


BR,
Baskar Jay

Please Log in or Create an account to join the conversation.

  • VK
  • VK's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Globus:G9-G13|TAFC:R05-R23|TAFJ:R19,R23,R24:test
More
6 years 9 months ago #21953 by VK
Replied by VK on topic SORT fn not works as expected
SORT works text-like.. left-pad your numbers with zeroes or use LOCATE to sort the array.

Cheers
VK

Please Log in or Create an account to join the conversation.

  • baskarjay
  • baskarjay's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
6 years 9 months ago #21955 by baskarjay
Replied by baskarjay on topic SORT fn not works as expected
Hello VK,

Thanks for the response VK ..
Is there any API to make it more simple ???....

BR,
Baskar Jay

Please Log in or Create an account to join the conversation.

  • VK
  • VK's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Globus:G9-G13|TAFC:R05-R23|TAFJ:R19,R23,R24:test
More
6 years 9 months ago #21957 by VK
Replied by VK on topic SORT fn not works as expected
Hi
there's no one-liner... refer to an example at:

jbc.temenos.com/pages/locate.html

Cheers
VK

Please Log in or Create an account to join the conversation.

  • jpb
  • jpb's Avatar
  • Offline
  • Moderator
  • Moderator
  • retired . . . ¯\_(ツ)_/¯
More
6 years 9 months ago #21964 by jpb
Replied by jpb on topic SORT fn not works as expected
Have a look at

jbc.temenos.com/pages/sselect.html

SSELECTV or SSELECTN might be of interest . . .

Please Log in or Create an account to join the conversation.

Time to create page: 0.031 seconds