AnsweredAssumed Answered

Count Blank fields problems when sorting

Question asked by user28397 on May 16, 2017
Latest reply on May 16, 2017 by 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

Outcomes