I've created a load-all subfile so I could take advantage of the client-side sorting. It only has 1 column.
If the user changes the sort to descending, is there any way to retain the descending sort when it comes back to the RPG program? It seems that when the writes back to the browser, it always defaults to ascending order.
Retaining subfile sort
-
- New User
- Posts: 6
- Joined: Thu Oct 29, 2015 5:18 pm
- First Name: Kevin
- Last Name: Farison
- Company Name: WinWholesale
- Contact:
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Retaining subfile sort
The sorting is only for display purposes. The data is returned to the RPG program in the same sequence it was originally written. This was done so that you could add sorting to existing programs without breaking them.
Currently, there is no way to change this behavior.
If the reason you want to do this is so that the sort sequence is retained across screen re-loads, you might consider using the 'persist state' property. This will keep the sort sequence across screen reloads (without returning the sorted sequence to your RPG program.)
Or, if it's cruicial for the data to be sorted in the RPG program (I'd be interested to hear why that would be desired) instead of letting Profound UI do the sorting, you could use the 'column sort response' property so that when someone clicks on a column heading, the column number is sent back to your RPG program, and your program can do the sorting itself using SORTA, qsort or whatever method you can imagine. Done that way, of course, the sort will be retained.
Currently, there is no way to change this behavior.
If the reason you want to do this is so that the sort sequence is retained across screen re-loads, you might consider using the 'persist state' property. This will keep the sort sequence across screen reloads (without returning the sorted sequence to your RPG program.)
Or, if it's cruicial for the data to be sorted in the RPG program (I'd be interested to hear why that would be desired) instead of letting Profound UI do the sorting, you could use the 'column sort response' property so that when someone clicks on a column heading, the column number is sent back to your RPG program, and your program can do the sorting itself using SORTA, qsort or whatever method you can imagine. Done that way, of course, the sort will be retained.
-
- New User
- Posts: 6
- Joined: Thu Oct 29, 2015 5:18 pm
- First Name: Kevin
- Last Name: Farison
- Company Name: WinWholesale
- Contact:
Re: Retaining subfile sort
I set the "persist state" to true but it still comes back in an ascending order.
I assume this is happening because my subfile was written initially to the browser in ascending order. Is there some way for the RPG program to know that - at the time the page was submitted to the program - a column was in descending or ascending order?
Currently, I only use one "sorting-type" variable/property in the display file - "initial sort column". Could this be screwing me up?
Thanks.
I assume this is happening because my subfile was written initially to the browser in ascending order. Is there some way for the RPG program to know that - at the time the page was submitted to the program - a column was in descending or ascending order?
Currently, I only use one "sorting-type" variable/property in the display file - "initial sort column". Could this be screwing me up?
Thanks.
- Glenn
- Profound Logic Staff Member
- Posts: 124
- Joined: Mon Apr 14, 2014 4:08 pm
- First Name: Glenn
- Last Name: Hopwood
- Company Name: Profound Logic Software
- State / Province: Ohio
- Country: United States
- Contact:
Re: Retaining subfile sort
Kevin,
As Scott mentioned in his reply, the client-side sorting is only for display. If you need the underlying subfile to be sorted you will need to use the 'column sort response' property and sort it in the RPG program.
Glenn
As Scott mentioned in his reply, the client-side sorting is only for display. If you need the underlying subfile to be sorted you will need to use the 'column sort response' property and sort it in the RPG program.
Glenn
-
- New User
- Posts: 15
- Joined: Wed Oct 28, 2015 2:48 pm
- First Name: Colin
- Last Name: McNeill
- Company Name: Profound Logic
- City: Irvine
- State / Province: California
- Country: United States
- Contact:
Re: Retaining subfile sort
Kevin,
We've created a support ticket regarding your issue. We'll be in contact through email!
We've created a support ticket regarding your issue. We'll be in contact through email!
Who is online
Users browsing this forum: No registered users and 0 guests