Topic: How to sequence or sort the search result by number?

Hi guys any help is appreciated.

The problem is that on my database I need to sequence or sort the search result like this one.

1. Landscape training
2. Mountain test
3. Drone test

But on number 12 and 13 and so on it goes like this

1. Landscape training
12. Equipment testing
13. Table inspection
3. 3. Drone test

How can I sort it so that the 12 comes after 11 and will not come after number 1?
by the way the numbers is part of the title.

Thanks again smile

Re: How to sequence or sort the search result by number?

After researching it seems the default is that it searches and displays the result alphabetically that is why 11 , 12 or 13 comes before 2.

How can I make it search and display numerically instead so that 2 comes before 11 12 and 13 etc.?


Thanks again.

Re: How to sequence or sort the search result by number?

I think your numbering is in the text box,  just add integer fields for your numbering.. then sort in asc...

Re: How to sequence or sort the search result by number?

Perhaps you use wrong data type of the filed for numbering, you should use INTEGER instead TEXT.
Please attach your project (zip file without exe and dll).

Dmitry.

5 (edited by derek 2019-04-26 13:38:16)

Re: How to sequence or sort the search result by number?

Hi g0dmenuelz,
As Manixs suggests, you could add a second numeric column, hide it and then sort on it.
But a simpler trick would be to use 2 digit numbering - instead of 1, 2, 3 etc, use 01, 02, 03 etc.
Obviously if you have more than 99 search results, you need to use 3 digit numbering.
I think it looks better anyway because the numbers and the text 'line up' (just a personal preference).
Derek

Post's attachments

Attachment icon sortsequence.zip 336.43 kb, 318 downloads since 2019-04-26 

6 (edited by tcoton 2019-04-26 16:47:53)

Re: How to sequence or sort the search result by number?

I have tried to reproduce your issue with a super basic app and I could sort the way you want using a specific order by set on the grid:

ORDER BY : column*1, column

http://myvisualdatabase.com/forum/misc.php?action=pun_attachment&item=5383

Post's attachments

Attachment icon screenshot_order_by.png 248.14 kb, 144 downloads since 2019-04-26 

7 (edited by derek 2019-04-26 16:56:26)

Re: How to sequence or sort the search result by number?

Hi Thierry,
Nice one!  Never seen it done like that before.
Kudos!
Derek.

Re: How to sequence or sort the search result by number?

Thanks so much guys! All your suggestions are working perfectly.