Count of Rows Expression - Word Template

“<<Start: Select(Due in Today[JobID], TRUE)>><<[JobID]>><<E…nd>>”

Hi
The above will return Individual JobID’s in each row, which is fine. Bit can I count those rows instead? How would I tweak the above expression to just give me the count of rows?

Thanks

COUNT(Select(Due in Today[JobID], TRUE)) ?

1 Like

Hi Simon, much appreciated. The report fails on:

“Errors”: “Error: Report ‘Summary’ action ‘Send Summary’ Attachment template. Start expression ‘COUNT(Select(Completed This Month [JobID], TRUE))’ should generate a List of Ref values. Please verify that it generates a List and that the contents of the List are Ref values. Ref values should come from the ‘Key’ column of the referenced table.”,
“EmailTo”: “…hidden…”,

Any ideas why?
[JobID] is a key column.

Select(Due in Today[JobID], TRUE) will return a list of Ref column IDs

COUNT(Select(Due in Today[JobID], TRUE)) will always just be a number

A start conditon MUST return a of Refs

2 Likes

I think I understand that. I only want to count [JobID]'s and not return a list.

I’ve tried:
“<<Start: COUNT(Select(Due in Today[JobID], TRUE))>><<[JobID]>><<E…nd>>”

“<<Start: COUNT(Select(Due in Today[JobID], TRUE))>><<E…nd>>”

“<<Start: COUNT(Select(Due in Today[JobID]))>><<[JobID]>><<E…nd>>”

And a couple of other variations, I don’t know how to fix this.

Just put <<COUNT(Select(Due in Today[JobID], TRUE))>> in the template document

<<START: … is only really when you want pull in a set of rows of data such as into a table

3 Likes

:+1:
Aaaah… Got it and it works.
Thanks you again Simon.

Kind Regards

2 Likes