orderBy not working as expected while changing the language.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2024 12:37 AM
Hi!!
I am displaying a list of values in the catalog form in ascending order with some dynamic filters applied through a script include.
I use gr.orderBy(fieldName); to sort the values. This works as expected when the instance language is english. When the language gets changed, the order of the listed value in the form gets changed.
Any alternate solution to overcome this.
Thanks!
Ramkumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2024 03:35 AM
What exactly do you mean that the order gets changed? Isn't it in the correct alphabetical order anymore, or do you expect the order to be the same as it is in English and is it now ordering alphabetically by the other language?
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2024 10:38 PM
Yes, the alphabetical order gets changed while changing the profile language.
Yes, It is not in the correct alphabetical order for other languages expect English.
Yes, We expect the alphabetical order should not be changed/altered/disturbed for other profile languages like Spanish, German, etc.
Thanks!
Ramkumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-30-2024 01:21 AM
Found the cause :
As the field type is translated text, the system sort the order based on the provided translated texts. As the translations are not applied, the system sorts the items based on the sys_ids. The proposed solution here is to either change the type of the field to string from translated_text OR to apply the translations.
Thanks!
Ramkumar.