Aggregate( function

I’m having trouble with this and would appreciate help:
This formula: aggregate(“LiveMeetings”, “count”,“contains “Ethics””)
gets the error message “Expression contains an operand when an operator was expected.”
No combination of quotes I use makes any difference.
I’m sure I’m making a rookie mistake, but…

Your formula is:

contains "Ethics"

When you view it on it’s own like this, hopefully it’s obvious what the problem is – you need an operand on the left side of the contains operator. In this case, probably a field name. Probably something like this (I made up a field name).

Topic contains "Ethics"

I see now. I was thinking that having the field name as the first parameter took care of that. Thanks!

Jim gave the correct answer already.

But it does not hurt (and makes the syntax clearer) to use curly brackets to include the query formula:

aggregate("LiveMeetings","count",{Topic contains "Ethics"})
1 Like

Is Aggregate working for everyone else? I have a simple use of it that sometimes give me the correct number and other times not. My code has

LTotalPaid = Str(Aggregate(VendorCost,"","","","")) 

and while I can see the VendorCost for the records in front of my face, sometimes that value is accurate and sometimes it is greater than it should be, and sometimes less than it should be. (I have previously selected a set of records and am using the Aggregate to establish a value to put into an email.)

Try quoting the first parameter too:

LTotalPaid = Str(Aggregate(“VendorCost”)

1 Like