This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
I'd like to get an email after a join that gives me the record count of un-joined records, but if there aren't any un-joined records, I keep getting an error...
Error: Email (7): ComposerEmailInterface: Record#1 From Field is Empty
I've tried various methods to resolve this, like combining the matched and unmatched in a text formula like "X matched and Y unmatched records" but I can't seem to solve the problem. It's driving me a little crazy.
So I guess my question is, how can I get a field with no records to show up as zero?
The really weird part is that I have a browse at the same place in the chain as the email tool, and it's got no problems at all...
Report: 41 Matched Inv Prod Lines and Unmatched Inv Prod Lines 16 matched Book lines and unmatched Book lines and matched Boo
I actually ran across this issue the exact opposite way - I was getting emails back even though I didn't want any.
When I plodded through this, it turned out that the reporting tool is kinda funny:
- if all you have in the e-mail is a table, then if there's no results in the table, then there's no rows in the data stream going to the e-mail ('cause the table acts as one row with a big object in it)
- if you add in a header, a footer, and a top-line with a record count - then suddenly you have 3 or 4 rows in your data stream, so even if you have no row in the table, the eMail component still has a non-zero record set to work with.
So for me this was a problem to fix rather than a feature 🙂 but for you this is exactly what you need.
- Add a header
- Add a footer
- add report text saying something like "report run on dd/mm/yyyy - records returned 0"
Then you should have the ability to send zero-row record sets
Attached a mock-up for you to play with - just mess around with the filter on the front-end to either get zero or non-zero rows - but you should get an e-mail irrespective.