Forum Discussion
I've also tried a variation on a query posted by MarkShnier , but I'm not able to get a distinct count - it's only returning zeros:
var text QUERY =
"{145.EX.'" & ("{145.OBF.'" &[Date of Interaction]) & "'}";
Size(
GetRecords($QUERY))
OK, try this.
var text QUERY =
"{145.EX.'" & [my email field] & "'}"
& " AND "
& "{145.OBF.'" &[Date of Interaction]) & "'}";
Size(
GetFieldValues(
GetRecords($QUERY),3))
Note that in Formula Queries there is not a COUNT function. It's called Size. ie Size means to count the number of records returned by the Query.
- JenniferJuhasz6 months agoQrew Cadet
Hi Mark,
Thank you so much for this. It worked without a syntax error after removing the ')' following [Date of Interaction]; however, the results are still nothing - no counts of any kind.
When using an OBF function relating to an email address, I would think I would always have a '1' as a result, counting the record that's doing the request here... If I search for a given email address I will get a range of results from 1 to 10 or 20 depending on the client, but never zero. I understand the difference between Count and Size, but I still can't get either function to provide an accurate result.
I wonder if my challenge is to do with that my field with email addresses is actually a formula query combining two different/separate fields (it's an if-then field) as staff will populate a NEW address field if the client is New to us or perform a lookup of our contacts table if it's an existing client. Ie - if NEW is blank, then use Existing so that there's always something to report with.
Thoughts?
Thank you!