Using Family e-mail addresses

Postby John Dykema » Mon Jun 27, 2016 1:24 pm

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 Dykema
 
Posts: 288
Joined: Sun Sep 28, 2003 4:37 pm
Location: First Cutlerville Christian Reformed Church

Re: Using Family e-mail addresses

Postby NeilZ » Mon Jun 27, 2016 1:32 pm

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 ?

Neil Zampella

Using PC+ since 1999.
NeilZ
 
Posts: 8906
Joined: Wed Oct 08, 2003 12:20 am
Location: Connellsville, PA

Re: Using Family e-mail addresses

Postby John Dykema » Mon Jun 27, 2016 1:55 pm

Correct, Profiles/Other output/custom reports
John Dykema
 
Posts: 288
Joined: Sun Sep 28, 2003 4:37 pm
Location: First Cutlerville Christian Reformed Church

Re: Using Family e-mail addresses

Postby Zorak » Tue Jun 28, 2016 8:27 am

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".
Zorak
Tech Support
Tech Support
 
Posts: 2493
Joined: Thu May 13, 2004 8:59 am
Location: PowerChurch Software

Re: Using Family e-mail addresses

Postby John Dykema » Tue Jun 28, 2016 3:40 pm

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).
John Dykema
 
Posts: 288
Joined: Sun Sep 28, 2003 4:37 pm
Location: First Cutlerville Christian Reformed Church

Re: Using Family e-mail addresses

Postby John Dykema » Tue Jul 05, 2016 9:27 pm

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
John Dykema
 
Posts: 288
Joined: Sun Sep 28, 2003 4:37 pm
Location: First Cutlerville Christian Reformed Church

Re: Using Family e-mail addresses

Postby Zorak » Mon Jul 11, 2016 9:56 am

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, ' ')
Zorak
Tech Support
Tech Support
 
Posts: 2493
Joined: Thu May 13, 2004 8:59 am
Location: PowerChurch Software

Re: Using Family e-mail addresses

Postby John Dykema » Tue Jul 12, 2016 6:47 pm

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"?
John Dykema
 
Posts: 288
Joined: Sun Sep 28, 2003 4:37 pm
Location: First Cutlerville Christian Reformed Church

Re: Using Family e-mail addresses

Postby Zorak » Wed Jul 13, 2016 8:10 am

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!
Zorak
Tech Support
Tech Support
 
Posts: 2493
Joined: Thu May 13, 2004 8:59 am
Location: PowerChurch Software