DatasetModel Class - BREAK BY?
 
Forums / SmartComponent Library - Developer Forum / DatasetModel Class - BREAK BY?

DatasetModel Class - BREAK BY?

3 posts, 1 answered
  1. Roger Blanchard
    Roger Blanchard avatar
    381 posts
    Registered:
    29 Jun 2018
    16 Oct 2020
    Link to this post
    What would be the best way to achieve the following using the DatasetModel class? I need to break by a field and then take action on the first of and last of.

    FOR EACH LogHold BREAK BY LogHold.TransNum:

    IF FIRST-OF (LogHold.TransNum) THEN 
  2. Mike Fechner
    Mike Fechner avatar
    319 posts
    Registered:
    14 Sep 2016
    Answered
    22 Oct 2020 in reply to Roger Blanchard
    Link to this post
    Hi Roger, 

    I'm afraid that would only be possible by using a set of your own variables and keeping that when it changes. 

    Or you BIND to the ProDataset within the model and use a classic FOR EACH statement.
  3. Roger Blanchard
    Roger Blanchard avatar
    381 posts
    Registered:
    29 Jun 2018
    23 Oct 2020 in reply to Mike Fechner
    Link to this post
    I did the latter and it is working just fine.

    Thank you.
3 posts, 1 answered