Template Start Expression - Orderby with Filter Expression Assistance

I need some expression help. I was able to get my report created properly after @SkrOYC helped me yesterday by showing me the Template Start Expression guide (wasn't aware of that at all 🙂 )

I want to further tweak my template a little bit at a time, with my first thing being to order the results so that common elements are grouped. The report that I am creating collects the past seven days worth of "Seen By Provider" records from a table and puts them in a spreadsheet to be emailed.

The start expression I'm using is:

<<Start: Filter(Seen by Provider, [Seen Timestamp]>=(Today()-7))>>

and it works. I would like the default format of the spreadsheet to be ordered by [Patient Name], with a secondary sort of the [Seen Timestamp] for when they were seen, so that Patient A is first on the list, and if Patient A was seen 100 times this week, the records are in order by date.

I am sure this can be accomplished with an OrderBy() expression, or maybe a Sort() expression combined with the Filter() expression. I'll need to read over the documentation for OrderBy and Sort to figure out which of these would be best for this situation, as they seem similar at first glance. But I guess my main question is, would the filter expression be contained inside of orderby or sort, or would it be the other way around?


Screenshot 2022-04-08 09.21.39.png

Solved Solved
0 2 161
1 ACCEPTED SOLUTION

2 REPLIES 2

easy enough 🙂 I guess the dyslexia kicked in again and I totally missed the example on that page where they clearly show the filter expression inside the orderby() statement.

Thank you.

Top Labels in this Space