Why the table dont how all records when the screen is acessed?

I have a screen that has a table records to show the name of a user and in another column the number of posts published by that user. So in the preparation of the screen, I have an aggregate with a group by on the name of the user and sum in the id of the post. It's working but now I add an input so that the user can introduce for example "1" and then click on the "Search" button it only appears the users that have published 1 post. This is also working, I add this filter for that:

        Count = NumberOfPostsByUser or NumberOfPostsByUser = NullIdentifier()

 The issue is that when the screen is accessed in the table records appear "No users to show" however it should appear all data by default. The "or NumberOfPostsByUser = NullIdentifier()" should not solve this issue?


Hi Oscar,

can you explain it a bit more, or use some screenshots? 

What do you want to build? How does it behave and what did you expect?

Do you want to filter on users having 'x' posts? Which in your aggregate is 'Count = NumberOfPostsByUser'.

But why do you have the 'or NumberOfPostsByUser = NullIdentifier()'. It doesn't make sence to have an identifier compare here, since I would expect a number/integer. Perhaps you are using an outer join on posts having post.userid = nullidentifer(). So please give some more information. 

Regards,

Hans


Solution

OsCaR_ wrote:

I have a screen that has a table records to show the name of a user and in another column the number of posts published by that user. So in the preparation of the screen, I have an aggregate with a group by on the name of the user and sum in the id of the post. It's working but now I add an input so that the user can introduce for example "1" and then click on the "Search" button it only appears the users that have published 1 post. This is also working, I add this filter for that:

        Count = NumberOfPostsByUser or NumberOfPostsByUser = NullIdentifier()

 The issue is that when the screen is accessed in the table records appear "No users to show" however it should appear all data by default. The "or NumberOfPostsByUser = NullIdentifier()" should not solve this issue?


you have a sum, and it should ever return "0" or different zero, so you don't have all records, because your query will search for records with sum=0 or different of zero. so you have to change this:

 Count = NumberOfPostsByUser or NumberOfPostsByUser = NullIdentifier()

to this:

NumberOfPostsByUser = 0 or Count = NumberOfPostsByUser, assuming that NumberOfPostsByUser is a variable of integer type.


Thanks and Best Regards,

Nuno Pereira


Solution