6 Replies Latest reply on May 16, 2017 9:45 AM by user28397

    Count Blank fields problems when sorting

    user28397

      Hi

      i'm tryin to count blank fields in a table but i found problems when i sort the table from a layout.

      I have 3 tables:

      - Users

      - Users_Messages JoinTable

      - Messages

       

      in the join table (Users_Messages) i have:

      - id_message_fk

      - id_user_fk

      - status

      - date

      - CountMessages,  Calculation, (Unstored, Get (FoundCount)

      - CountNonReadMessages, Calculation,  (Unstored, IsEmpty (Status)

      - Total, Summary,  =Total of CountNonReadMessages (Running)

       

      I setup a layout based on Users_Messages JoinTable and OnLayoutEnter  a script:

       

      Set Error Capture

      Perform Find (based on user Id)

      ..........

      $$nonreadmessages GetSummary ( Users_Messages::Total; Users_Messages::Date )

      Sort (Users_Messages::date)

       

       

      What I want is to use the value of $$nonreadmessages in another layout.

      If I place the Total Field in a Leading Grand Summary and the count is right, but the value of $$nonreadmessages based on this field is not.

      What could be the problem? Why the value of the global variable is different from the Total Field?

       

      Thanks