1. Daniel Vivier
  2. PowerBuilder
  3. Thursday, 18 October 2018 19:04 PM UTC

The docs indicate that if you return 2 in the RetrieveStart event of a DataWindow (or DataStore), a call to Retrieve() will append rows to the DW.

In fact, what it appears to do, if there is a defined sort order on the DW, is re-sort it after the Retrieve has added the rows. That does not appear to be documented, and took me a whole bunch of debugging (actually got-here messageboxing, the debugger kept crashing!) to figure out why a feature that used that was doing something entirely wrong.

Is this a documentation bug? Feature bug? (I personally think it shouldn't do that.)

Accepted Answer
Daniel Vivier Accepted Answer Pending Moderation
  1. Thursday, 18 October 2018 20:43 PM UTC
  2. PowerBuilder
  3. # Permalink

OK, never mind. I was ignoring the fact that Retrieve() always applies any defined sort criteria on the window. And I misread the docs about returning 2 in the RetrieveStart event, which says it "adds" rows to the existing ones. I interpreted that as "appends", and thus didn't expect it to do further sorting, I expected the added row(s) to be at the end.

I does seem to me to be a documentation issue that nowhere in the Help for the Retrieve() method does it mention that after a Retrieve, any defined sort criteria on the window (or ones set with SetSort) are applied. It also doesn't mention that in the Help for SetSort. It does mention it in the Help for Sort.

Comment
  1. David Peace (Powersoft)
  2. Friday, 23 November 2018 16:26 PM UTC
I was just about to copy the manual text for that to answer your question.

Never mind Dan, it's been along week!



All the best

David
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Wednesday, 21 November 2018 11:26 AM UTC
  2. PowerBuilder
  3. # 1

(in addition: I think the re-sort also happens when you do dw_1.SetRedraw(true) and maybe even when doing dw_1.GroupCalc() )

 

Comment
  1. Chris Pollach @Appeon
  2. Wednesday, 21 November 2018 15:19 PM UTC
Hi Miguel ... Definitely on a GroupCalc() method call. ;-)
  1. Helpful
There are no comments made yet.
Tracy Huang @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 21 November 2018 02:16 AM UTC
  2. PowerBuilder
  3. # 2

Thank you Dan, for pointing out this. We have made improvements to the 2017 R3 and 2018 Help.

 

Regards

Tracy Huang

Appeon Doc Team

Comment
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.