Jump to content

Database's listing order doesn't work


Recommended Posts

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? 😕

Link to comment
Share on other sites

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 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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! 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...