Jump to content

Database's listing order doesn't work

Featured Replies

Posted

Hello guys,

I created a new database for Ranking some products and I used custom fields for the criteria. The custom field is a number and I want all of them to be listed using this value, so in the database page I set to order the items by that custom field and it should be like: 2002,1816,240,142 etc. But doesn't work, it mix up, if I change the order from ascendig to descening things doesn't change, it mix them again.

 Cattura.PNG.53b7e2f4810539416895929c0930b13d.PNG

As you can see I set Sort by the custom field I want but yet, nothing worked 😮

 

Cattura44.PNG.74f4a7a84a643ca964568e1afda20187.PNG

Maybe I am missing something? 😕

  • Community Expert

The settings you show are for the frontpage only, not for the listing view. You need to go to the Options tab. 

  • Author
1 hour ago, opentype said:

The settings you show are for the frontpage only, not for the listing view. You need to go to the Options tab. 

Hi, I changed the settings from the Options tab but nothing happened, still the same 😮 Order is still mixed 

  • Community Expert

Then you can open a support ticket so someone can check it out directly on your website. 

  • Author
1 hour ago, opentype said:

Then you can open a support ticket so someone can check it out directly on your website. 

Okay, done thanks 🙂 

Sorting by numbers stored in a textual field in MySQL can be a little funky. You'll note it's actually sorting by the first digit, then the second digit, and so on (e.g. the first entry starts with 9, then the next ones start with 2, then the next ones start with 1). This could be a bug and the ticket is your best route.

  • Author
3 hours ago, bfarber said:

Sorting by numbers stored in a textual field in MySQL can be a little funky. You'll note it's actually sorting by the first digit, then the second digit, and so on (e.g. the first entry starts with 9, then the next ones start with 2, then the next ones start with 1). This could be a bug and the ticket is your best route.

Okay got it thanks, they agreed with you also in the suport ticket so I think I must find another way to make it 😄 Thank you anyway guys! 

  • Author

EDIT

I found a solution for now:

I created a new TEXT field and I insert the value like that: X0001816 or X0000016. Always starting the number from right and keeping the exact number of digits (8) and adding a letter (X) to the begin of the value. 

 

ABC.PNG.0615904354387434736957fd30faece7.PNG

 

ABS.PNG.cb026d3f76b4446591fdf33dca68dd7d.PNG

  • Community Expert

It would really depend on the field type. If it’s text, then that behavior makes perfect sense and might even be required, e.g. to order alphanumeric entries like SKUs, bank account details and so on. But for a number field, IPS can certainly make it happen to order the entries as numbers—if that doesn’t work this way currently. 

  • Author
53 minutes ago, opentype said:

It would really depend on the field type. If it’s text, then that behavior makes perfect sense and might even be required, e.g. to order alphanumeric entries like SKUs, bank account details and so on. But for a number field, IPS can certainly make it happen to order the entries as numbers—if that doesn’t work this way currently. 

I even tried formatting the number differently (001, 01, 0.1 etc) when I did set the custom field as "Number". Yet nothing to do, the only way to order it like that, was using my "method" and the Text Field.

  • Community Expert

Sure, I get it. What did the support say? Are they going to look into it some more? Sometimes you need to stand your ground in a support ticket. 😉

Im Not Going Season 4 GIF by This Is Us

  • Author
28 minutes ago, opentype said:

Sure, I get it. What did the support say? Are they going to look into it some more?

Yes! 😉 They told me they're gonna have a discussion on this. Let's see :cool:

I just want to be clear are you using a "text" field or a "number" field?

image.png.c2c55fa9452bdca968e19a1af1cec851.png

They do behave differently in pages. If you use a number field it should work correctly @Matteo Russo

  • Author
37 minutes ago, Morrigan said:

They do behave differently in pages. If you use a number field it should work correctly @Matteo Russo

I had the problem when I used the format "number", that's why I found it strange. Logically also to me seemed the right solution for this kind of field. I fixed it using the field "Text" like I said here. ⬇️

 

On 5/12/2020 at 6:15 PM, Matteo Russo said:

EDIT

I found a solution for now:

I created a new TEXT field and I insert the value like that: X0001816 or X0000016. Always starting the number from right and keeping the exact number of digits (8) and adding a letter (X) to the begin of the value. 

 

ABC.PNG.0615904354387434736957fd30faece7.PNG

 

ABS.PNG.cb026d3f76b4446591fdf33dca68dd7d.PNG

 

Archived

This topic is now archived and is closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.