Page 1 of 1

Using Family e-mail addresses

Posted: Mon Jun 27, 2016 1:24 pm
by John Dykema
I've written many custom reports but I keep getting the Yellow screen of death on one I'm modifying.
I recently started using the Family e-mail field if both parents use the same one, erasing the Profile emails. Now I have to change several custom reports that I've written. So in the report I'll need to test if the Profile e-mail is blank, then use the Family email, right?
I am able to add the Family e-mail Unlisted field to the Edit Output Fields without a problem. I can also add other fields like State to the Edit Output Fields with no problem. As soon as I add Family E-mail and Run the Query I get the Yellow death nell. Any advice?
Thanks. You've been very helpful before.

Re: Using Family e-mail addresses

Posted: Mon Jun 27, 2016 1:32 pm
by NeilZ
John Dykema wrote:I've written many custom reports but I keep getting the Yellow screen of death on one I'm modifying.
I recently started using the Family e-mail field if both parents use the same one, erasing the Profile emails. Now I have to change several custom reports that I've written. So in the report I'll need to test if the Profile e-mail is blank, then use the Family email, right?
I am able to add the Family e-mail Unlisted field to the Edit Output Fields without a problem. I can also add other fields like State to the Edit Output Fields with no problem. As soon as I add Family E-mail and Run the Query I get the Yellow death nell. Any advice?
Thanks. You've been very helpful before.
John, just one additional question for information, you're writing this report under the Personal Profile Maintenance function, right ?

Re: Using Family e-mail addresses

Posted: Mon Jun 27, 2016 1:55 pm
by John Dykema
Correct, Profiles/Other output/custom reports

Re: Using Family e-mail addresses

Posted: Tue Jun 28, 2016 8:27 am
by Zorak
If you are including both family and profile e-mails, the report system will rename both "e_mail" fields to "e_mail_a" and "e_mail_b".

Re: Using Family e-mail addresses

Posted: Tue Jun 28, 2016 3:40 pm
by John Dykema
Thanks, Zorak. Actually I don't even get that far. I've tried it both ways in that if I add just E-mail (from profiles), or just "Family E-mail" to the Edit Output Fields the query will run fine. But when I add the other email field in, the query aborts. Seems like it cant handle both email fields at the same time.
My system information is:
6/20/2016
PCPlus11
Windows 6.02 (I'm actually running Win 10 on my Lenovo laptop. I don't know what 6.02 is).

Re: Using Family e-mail addresses

Posted: Tue Jul 05, 2016 9:27 pm
by John Dykema
I'm now good with the Yellow Screen of Death and know how to get around that. I could easily do this in two reports but I'm trying to print, in one report:
If the Family MailStmt is True then print the Family Email, ELSE If the Profile emailstmt is True then print the Profile Email. I can't get that ELSE phrase to work. I'm sure the second IIF is the culprit.
See:
IIF(Qmf_temp.e_mailstmt_b =.T.,Qmf_temp.e_mail_b, IIF( Qmf_temp.e_mailstmt_a = .T., Qmf_temp.e_mail_a, ' ')

How do I put a compound If/Else expression in one field? Please advise.
Addition logic problems exist when there is a Family email shared by the parents but the kids also have their Contribution statments emailed to their own email address. I haven't figured that one out either but I can wait for later.
Thanks for all you do.
John

Re: Using Family e-mail addresses

Posted: Mon Jul 11, 2016 9:56 am
by Zorak
That "nested" IIF is formatted correctly. Otherwise, it would give you a syntax error when trying to run the report.

Something you should probably check for is that there is an e-mail address AND it is included on statements in each scenario:
IIF(e_mailstmt_b =.T. AND !EMPTY(e_mail_b),e_mail_b, IIF(e_mailstmt_a = .T. AND !EMPTY(e_mail_a),e_mail_a, ' ')

Re: Using Family e-mail addresses

Posted: Tue Jul 12, 2016 6:47 pm
by John Dykema
Actually I was getting a syntax error in my IIF statement and that's why I asked "How do I put a compound If/Else expression in one field?" but I liked the way you phrased it too.
Is the !EMPTY test mean same as "NOT EMPTY"?

Re: Using Family e-mail addresses

Posted: Wed Jul 13, 2016 8:10 am
by Zorak
Yes, it's just shorter. You can only have 254 characters in an expression, so especially once you start nesting inline ifs, it is important to use shorthand wherever possible!