1. John Strano
  2. PowerBuilder
  3. Thursday, 21 June 2018 20:29 PM UTC
So for the first time in 28 years of PowerBuilder, I have need of the First() method in a DWo expression.
 
You know where I'm going with this right?
 
Maybe I don't expect an answer; maybe I'm just in denial, but...
 
It's an aggregate function?!?!?!
 
OK, so I wish we were at a bar, or in the driveway with the hood of the pickup open with beers in hand to say, "yuh, yuh. There's yer problem."
 
Left ( ColumnA, 6 ) = 'wabbit' AND pos(first(ColumnA for all), 'Murgatroyd') > 0
 
...so this filter expression is null and void because PowerBuilder considers First() an aggregate.
 
Can anyone think or (or has already thought of) a work-around/-through , an equivalent?
 
Want to have the filter kick in, but only when the first row's value for that column is "Murgatroyd".
Accepted Answer
Roland Smith Accepted Answer Pending Moderation
  1. Thursday, 21 June 2018 20:39 PM UTC
  2. PowerBuilder
  3. # Permalink

You could say it is an aggravate function.

Since you are doing 'for all', you should be able to use column_name[1] .

Comment
  1. David Peace (Powersoft)
  2. Friday, 22 June 2018 09:09 AM UTC
Simple when you know how

  1. Helpful
  1. John Strano
  2. Friday, 22 June 2018 12:24 PM UTC
Odd that the offset is required when the docs say that the first row will be used if the offset is omitted.



Thanks again!



This should allow the filter expression for DWO syntax to include only a context where the processing can be specified to narrow the result set to the desired presentation style.

  1. Helpful
  1. John Strano
  2. Friday, 22 June 2018 12:27 PM UTC
@ David - Isn't that life all over! =Legacy emoji

  1. Helpful
There are no comments made yet.


There are replies in this question but you are not allowed to view the replies from 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.