1. Suresh Thoduvail
  2. PowerBuilder
  3. Wednesday, 17 April 2024 17:28 PM UTC

Issue: After PFC sorting on clicking the header of the results set (datawindow) the suppress repeating values does not work and displays the suppressed values again giving an appearance of duplicate values.

PowerBuilder Version 2022 R3 → Build 3289


Hi Experts,

I have a Grid data window presentation of accused information for our application that uses PowerBuilder Foundation Class "Inv_Sort" [i have verified that all the headers on the datawindow has an "_t" associated with the respective column headers].

Sort Columns:

The results are displayed and sorted by File Number, Incident Number, Police Agency, Incident From Date, Incident To Date and Charge Description.

The results also have suppressed repeating values, so that the File Number and other duplicated columns do not show again (Picture 1) .


When the user clicks on the File Status (to sort on either Active or Disposed Files to show at the top) on the results, the display gets jumbled up and the suppressed values seems to be repeated again (picture 2). The data keeps roaming in the grid display as soon as the user clicks on the header there by eliminating the suppression of the repeating values and appearing that the files are duplicated.

I understand that the PFC sort does only sort by the column header that was clicked and the rest of the sort that was already there is discarded.

PB DW Design Mode Tests:

On the datawindow it self (design mode), if i keep all the the previous sort columns intact and add "File Status" in addition to the existing soft columns, the data stays intact, but if i just used the "File Status" the rows keep roaming.


User sort functionality of each of the header columns are a mandatory requirement, but the Files and their associated data should stay intact and not keep roaming when the user clicks on the header of any of the columns. I did not group the data as it is just a display only window and not a reporting window. 

Experts, any suggestion/advise is greatly appreciated. Would i have to code my custom sort and discard the PFC sort functionality.

Thanks in Advance



Attachments (2)
Accepted Answer
Ronnie Po Accepted Answer Pending Moderation
  1. Wednesday, 17 April 2024 19:22 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi Suresh,

Something like the following should work when clicking "File Status" or other File-level or higher columns, but may not make sense when clicking lower-level columns like "Charge Description".

1. In the object u_dw, add an event ue_getSortSuffix() that returns a string.

2. Step through the code in pfc_n_cst_dwsrv_sort::pfc_clicked() to get an idea of how the pfc builds the sort string.

3. In the object n_cst_dwsrv_sort, override pfc_clicked(), copying all the code from its ancestor and adding additional logic as follows.

Just before of_setSort(ls_sortstring), add the line

ls_sortstring = ls_sortstring + idw_requestor.ue_getSortSuffix()

After of_sort(), add


4. In the DW control in your window, add code to the ue_getSortSuffix() event that returns a comma-separated list of column names corresponding to "the Files and their associated data [that] should stay intact and not keep roaming" when sorted. (See PowerBuilder help for setSort() for exact specs.)


  1. Suresh Thoduvail
  2. Wednesday, 17 April 2024 19:59 PM UTC
Thanks Ronnie for your prompt reply ?
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 17 April 2024 19:11 PM UTC
  2. PowerBuilder
  3. # 1

Hi Suresh ;

  Are these "Group" based DWO's?

Regards ... Chris

  1. Suresh Thoduvail
  2. Wednesday, 17 April 2024 19:56 PM UTC
Hi Chris, this datawindow is not Grouped. The duplicate values are Suppressed except the Charge Description.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1

There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.