Question

Photo of Ryan Vesely

0

Generating report - Multiple Parent's Phone Numbers per cell

I am trying to generate a report for the kids involved in kid's ministry group. I would like to generate the home phone number for the family. I only need the primary home phone from one of the parents. When I run a report with the field "Parent's Phone Number" I get the number from both parents put into the same cell. So when I export to excel, there are two in the cell. Same thing with "Parent's Email Address" (it exports like this: (xxx) xxx-xxxx, (xxx) xxx-xxxx). 

I have tried using the function to flip the export to show the parents and just using the home phone number, but then I get two entries for each family. I just need one home phone number per individual in the group. Is there an easy way to generate this?


  • Photo of Michael Garrison

    0

    Ryan,

    Sorry this has gone unanswered!

    With a little bit of playing tonight, I think I've got a solution for you.

    In the report, rename the "Parents Phone Numbers" cell to something like "Phones". Set that column to NOT show up in the grid. Now add an additional column of type "Lava" and use the following code:{{ Phones | First | Property:'NumberFormatted' }}

    Viola, now you have just the first phone number that your other (now hidden) cell was listing.


    Likewise the emails can be done the same way, though email addresses are less specialized than phone numbers. Whereas phone numbers each have properties of their own (number, numberFormatted, type, etc) an email address is just an email address. So if you rename the Parents Email Addresses column to something like "Emails" and hide it, you can create another Lava type column with the following: {{ Emails | First }}

  • Photo of Ryan Vesely

    0

    You rock! Thank you for the lava code. I was wondering if I could sort it out that way. I just didn't know the coding needed. This will work great. Thank you for the help!