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

DatasetModel Class - BREAK BY?

3 posts, 0 answered
  1. Roger Blanchard
    Roger Blanchard avatar
    272 posts
    Registered:
    29 Jun 2018
    16 Oct
    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
    197 posts
    Registered:
    14 Sep 2016
    22 Oct 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
    272 posts
    Registered:
    29 Jun 2018
    5 days and 5 hours ago in reply to Mike Fechner
    Link to this post
    I did the latter and it is working just fine.

    Thank you.
3 posts, 0 answered