764
Views
9
Comments
Solved
Total count in screen

I want to display the count of a column that I am referencing from an aggregate.  I can see the table in the screen with all the data and I just want to display the total for one expression on the same screen, but how do I get the total number of records where the value = N, right now the expression below just returns "Yes"


GetBatchMapMarksByBatchID.List.Current.Addresses.LivesinFL


2016-04-22 00-29-45
Nuno Reis
 
MVP
Solution

An expression?

To get that result you need an Aggregate with the filter Addresses.LivesInFL=No

Then you make an expression to show the count.


How many counters do you need? This is the type of request that I would do an Advanced SQL with all my needs to return at once all the counters.

2016-04-22 00-29-45
Nuno Reis
 
MVP

Hello Peter.


You do 

GetBatchMapMarksByBatchID.Count

to get total number of records from that query (like the COUNT in SQL).


Or

GetBatchMapMarksByBatchID.List.Length

to get the number of rows returned for the table. (usually, the table gets only one page each time to be faster)


I think you want the first.


The expression you were using is to see the Boolean value LivesInFL of the first record in the results. It can only say True/False so screen converts to Yes/No.

UserImage.jpg
Peter Goyal

Thank you.  I am already setting the following for another expression that gives me the total count of all mapmarks,.  Within that dataset ( i dont want to filter anything out) I just want to be able to display in another expression the total where LivesInFL = No


GetBatchMapMarksByBatchID.Count




2016-04-22 00-29-45
Nuno Reis
 
MVP
Solution

An expression?

To get that result you need an Aggregate with the filter Addresses.LivesInFL=No

Then you make an expression to show the count.


How many counters do you need? This is the type of request that I would do an Advanced SQL with all my needs to return at once all the counters.

UserImage.jpg
Peter Goyal

So how come I get this error, I just created one aggregate for this field since I am new and want to learn before getting involved with more complex stuff like Advanced SQL

2016-04-22 00-29-45
Nuno Reis
 
MVP

Peter Goyal wrote:

So how come I get this error, I just created one aggregate for this field since I am new and want to learn before getting involved with more complex stuff like Advanced SQL

Not "No". Use False. Boolean use True/False.

UserImage.jpg
Peter Goyal

What if livesinFL is a text field?  Which I have to keep as text for other business requirements

2016-04-22 00-29-45
Nuno Reis
 
MVP

If it is a text, write "No" so it is compared with a string. Without quotes, it will compare with a variable called No and you don't have one of those.

UserImage.jpg
Peter Goyal

Ok I think Im almost there.  Thank you for all your help.  So everything works except my total of all marks is 161, this is the master dataset.  The LivesinFL = "No" shows up as 352, any ideas?

UserImage.jpg
Peter Goyal

Ok I was missing a filter, thank you so much for your help Nuno!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.