@Philip_Garrett_Appsh I see how using the reverse reference negates having to use the condition of name=name. It seems to make the report generation faster as well.
Thank you for pointing that out … I have a few more reports to write, and I’ll be using this format in the future.
I would create a slice over the Students table that only contains students who made a payment last year. By using a slice, you divide the problem into two steps.
In step one you ensure the slice contains exactly the records you want.
More important, here is the approach I use to write expressions.
I start with the table I want to interrogate. In this case it is the Payments table.
I then add a virtual column to that table to help me debug the first part of the expression. In this case I want to determine if a payment happened last year. I wrote this expression:
Year([Date])= 2017
I tested it and it worked.
Next I replace 2017 with “Year(NOW())-1” and got this expression:
Year([Date])=Year(NOW())-1
I then went to the Students table and added a virtual column to see if I could count the payments he student had made regardless of the year. I wrote this expression:
COUNT(SELECT([Payment History][key], true))
I tested it and it worked.
I then combined the two expressions so I both count and filter on payment date. I wrote this expression:
In general: 1. I create expressions by starting with the simplest expression I can write.
I then make the expression richer in very small steps.
I work from the inside out. I write the inner most expression first. 4. I create temporary virtual columns and use the expression wizard to create and debug each step in my expression. 5. I never put an expression in a workflow template without verifying it as I described above. Debugging an expression by entering it directly in a workflow template is much too hard so I always debug it as described above.