I need to periodically generate a To Do report which includes cards contained in multiple lists across one board - if the cards have a designated (variable) value in the Custom Field.
Then I need to mail the report to a designated (variable) email address. I am hitting a limitation when attempting to use a $report_variable when filtering the cards collected for the report
My solution:
I created a board button with the following action steps.
First, I maintain two cards with reference information and when I want to create the report, my board button first creates two report variables: $email_des and $owner from that reference information.
create a report in variable "email_des" with all cards in list "Resources" with the "Tracking" label using pattern "{carddescription}",
create a report in variable "owner" with all cards in list "Resources" with the "Owner" label using pattern "{carddescription}",
Next, I collect all the cards (with a report pattern) that have the custom field "Business Owner" set to the value in {$owner} into a third report variable $to_do.
create a report in variable "to_do" with all cards without the purple "Workstream" label with custom field "Business Owner" set to {$owner} without the green "COMPLETE" label using pattern "[{cardname}]({cardlink}) \n\n _Next Step:_ {{%Next Step}} \n\n\n", Finally, I email the report in $to_do using also the value of $email_des for the recipient and value of $owner in the subject line.
and send an email notification to {$email_des} with subject "To Do List for {$owner} for {isodate}" and message "{$to_do}\n\n--- ---\n\n\n"
The result:
There are no cards collected into the report {$to_do}. However, there is a value in {$owner} because the email subject does contain the correct value from {$owner}.
Some troubleshooting:
If I replace {$owner} with hardcoded value in the $to_do report definition; the cards are collected into $to_do. Further, if I replace {$owner} with {username} and change the value of "Business Owner" custom fields for a few cards. This results in those cards where "Business Owners" is set to {username} being collected into the report $to_do.
I can't find anything about a limitation of using a report variables to filter cards collected for a report based on match to a custom field value. Has anyone encountered this limitation and solved it for a similar reporting need?
Is there a different way to use a variable value while filtering cards collected for a report?