This topic is locked

Sort issue with lookup value

8/24/2017 8:46:50 AM
ASPRunner.NET General questions
Pete K author

When I have a field on a list page that is displaying a lookup value via lookup wizard, clicking the column header in the generated app sorts on the underlying field value rather than the displayed (lookup) field value. This is not very intuitive and not at all helpful to my users.
Is there a way to make it sort on the displayed text from the lookup table rather than the underlying value from the list table page?

jadachDevClub member 8/24/2017

Wow, I never even noticed that.

Pete K author 8/24/2017

Jerry, can you confirm that it works the same way for you? I'd like to submit something to XLineSoft about this. If it's not the expected behavior, it's a bug. If it is the expected behavior, then it needs to be improved. Very hard explaining to a user why their list of school names won't sort alphabetically because they are actually sorting on the underlying codes contained in the table.

A
Arkie 8/24/2017

I don't follow. I don't see a way to use the lookup wizard on a list page. I use the wizard on add and edit pages where the resulting list pages sort correctly on any field which was looked up or auto filled.
~Joe

jadachDevClub member 8/24/2017



Jerry, can you confirm that it works the same way for you? I'd like to submit something to XLineSoft about this. If it's not the expected behavior, it's a bug. If it is the expected behavior, then it needs to be improved. Very hard explaining to a user why their list of school names won't sort alphabetically because they are actually sorting on the underlying codes contained in the table.


Yes, I can definitely say you are correct. I can't believe I never saw this. I think you should put a support ticket in and see what they say. Let us know.

Pete K author 8/25/2017



Yes, I can definitely say you are correct. I can't believe I never saw this. I think you should put a support ticket in and see what they say. Let us know.


Thanks for confirming. I will do that.

A
Arkie 8/25/2017

Are you perhaps finding this in the Enterprise Edition??
'cause I don't see any way to use a lookup wizard on a list page in standard ASPRunner.net

jadachDevClub member 8/25/2017



Are you perhaps finding this in the Enterprise Edition??
'cause I don't see any way to use a lookup wizard on a list page in standard ASPRunner.net


When on the Fields section, click Properties of the field in question. Choose edit as > lookup wizard.
By doing this, the list page will display correctly. It just won't sort correctly per Peter's issue.

Pete K author 8/28/2017

I did submit this and here is the response from Sergey:



Pete,
sort works on the database side while ASPRunner.NET replace lookup value with display value after data is retrieved from the database.
To make your data sortable by display value modify your SQL Query adding a joined lookup table and display a column from that joined table instead of original one. This way lookup data will be searchable and sortable.


Not real happy with this response. That just tells me what I already know. Of course I could add the lookup table to the query, but should we have to do this for every lookup value when we want to be able to sort properly? This is the kind of thing I expect a mature framework to do for me. Am I being too picky?

jadachDevClub member 8/28/2017



I did submit this and here is the response from Sergey:
Not real happy with this response. That just tells me what I already know. Of course I could add the lookup table to the query, but should we have to do this for every lookup value when we want to be able to sort properly? This is the kind of thing I expect a mature framework to do for me. Am I being too picky?


Well at least we know now. This issue hasn't come up yet in any of my apps. Weird that it hasn't. In any event, we do have a way to handle it. My hope would be that this would be added to some future release.

admin 8/30/2017

Unfortunately this is the way it works at the moment. We are aware of this issue and understand it is important. The problem is that this is not a quick fix and half-ass solution breaks more things than it fixes. We will dedicate time to fix this proper way.

jadachDevClub member 8/30/2017



Unfortunately this is the way it works at the moment. We are aware of this issue and understand it is important. The problem is that this is not a quick fix and half-ass solution breaks more things than it fixes. We will dedicate time to fix this proper way.


Thanks Sergey. Your efforts are very much appreciated. You guys are the best!

jadachDevClub member 8/30/2017



Unfortunately this is the way it works at the moment. We are aware of this issue and understand it is important. The problem is that this is not a quick fix and half-ass solution breaks more things than it fixes. We will dedicate time to fix this proper way.


Thanks Sergey. Your efforts are very much appreciated. You guys are the best!

Pete K author 9/5/2017



Unfortunately this is the way it works at the moment. We are aware of this issue and understand it is important. The problem is that this is not a quick fix and half-ass solution breaks more things than it fixes. We will dedicate time to fix this proper way.


Thanks