Page 1 of 1

Sorting multiple subfiles at once

Posted: Tue Sep 19, 2017 5:17 pm
by DanD
This is an expansion of this topic - I thought that this is deviating too much from that topic, and thought it would be best to start a new topic.

I'm trying to emulate a subfile where the first few columns appear to be "frozen", allowing certain information not to disappear from view, when the end-user is scrolling to the right.

I would like the ability to sort either subfile - but because of the technique used to emulate "freezing" certain columns is utilizing two subfiles, the sort (and other functions such as filter) doesn't work as intended.

Is there a way, after sorting, that the opposite subfile can be read and sorted in the same fashion (via JS) - either by utilizing the subfile row from the subfile that was sorted, or via a common field between the two subfiles? In order to facilitate Export to Excel to work properly, the "frozen" fields are also in the "non-frozen" subfile, with a column width of 0 (so the fields aren't truly hidden), so the Excel export should include them. Therefore, there are common fields between the 2 subfiles.

Thanks
-Dan

Re: Sorting multiple subfiles at once

Posted: Tue Sep 19, 2017 5:54 pm
by Scott Klement
No, as far as Profound UI is concerned you have two separate subfiles. Sorting/filtering one will not affect the other. Even if we added new JavaScript events to let you run code when one is sorted it wouldn't help, since each subfile is it's own entity and doesn't know about the other's data, so can't sort/filter the same way.

The only solution that I can think of would be to do the sorting in the server-side (most likely RPG) program. This is done with the "column sort response" property. When you click the column to sort it, the column number (starting with 0) will be put into the field you bind to the column sort response and control will be returned to your RPG program. The RPG program can then re-load both subfiles sorted by the appropriate column (just as you would do in green-screen).

Re: Sorting multiple subfiles at once

Posted: Tue Sep 19, 2017 9:38 pm
by DanD
Scott,

Thank you for the reply. Your answer was along the lines of what I anticipated.

But I figured it wouldn't hurt to ask.
-Dan