The complexity of complex return types (updated) – Looping a record return type

Update for my previous post: The complexity of complex return types. (I could have just updated the post, but since that wouldn’t trigger the people that already read it, I decided to create a small update just to pin your attention to the following..

After a few comments from Marknitek and Dennis Reineck, I realized that I forgot one important ability, that actually makes it (kind of) possible to use the Record-return type, and start looping with a minimum amount of code.

The trick is to use the Get/SetView methods. In all honesty, I can’t remember I ever used it. But in this case, it does seem to work. So, it could look like this:

And you’re even able to extend the filters as well, something like:

So .. If any more feedback/comments .. who knows, a third post will pop up today as well 🤣

4.50 avg. rating (91% score) - 2 votes

Permanent link to this article: https://www.waldo.be/2021/07/06/the-complexity-of-complex-return-types-updated-looping-a-record-return-type/

1 comment

    • Vincent Vancalbergh on August 21, 2021 at 12:46 pm
    • Reply

    All I can think of is they could add a Set() function to all Record variables where you can do a ByRef-like assignment.

    SalesLine.Set(Rec.SalesLines());
    //Filter it
    //Loop it

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: