Discussions

Expand all | Collapse all

Parse an email from multi select list for notification

  • 1.  Parse an email from multi select list for notification

    Posted 19 days ago
    Need help parsing email address for a multi-select list. I would like the list to display name along with the email. 
    Current list display:
    jsmith@quickbase.com
    j.doe@anotheremail.com

    Desired list display:
    John Smith - jsmith@quickbase.com
    Jane Doe - j.doe@anotheremail.com

    My email field formula is:

    var text EmailList = ToText([Email select field test]);

    Trim(Part($EmailList, 1,";"))

    The formula works great for my notification emails but I'm stuck on parsing out the emails for the list to display.

    Thanks!



  • 2.  RE: Parse an email from multi select list for notification

    Posted 19 days ago
    Just to clarify, you have a Multi-Select Text field that you currently have showing email addresses and you would like it to show the Name and Email address instead. In addition, you would then like to modify your current formula to pull out the first email address from your newly formatted list. Is this correct?

    ------------------------------
    Blake Harrison
    bharrison@datablender.io
    DataBlender - Quick Base Solution Provider
    Atlanta GA
    404.800.1702 / http://datablender.io/
    ------------------------------



  • 3.  RE: Parse an email from multi select list for notification

    Posted 19 days ago
    I am able to modify the multi-select field to add the names next to the emails, ie; (john smith - jsmith@qb.com). I just need to modify the email formula to parse the emails from the "-" (dash) so the notification will continue to identify the email only and correctly send. 

    Thanks!


    ------------------------------
    Ed Grandinetti
    ------------------------------



  • 4.  RE: Parse an email from multi select list for notification

    Posted 19 days ago
    Ok, so I think I would do it something like this:
    Trim(Part(SearchAndReplace($EmailList,"-",";"), 2,";"))​

    ------------------------------
    Blake Harrison
    bharrison@datablender.io
    DataBlender - Quick Base Solution Provider
    Atlanta GA
    404.800.1702 / http://datablender.io/
    ------------------------------



  • 5.  RE: Parse an email from multi select list for notification

    Posted 19 days ago
    That didn't work. Might help if I explain that the email formula is unique to each email.
    ie., 
    Trim(Part($EmailList, 1,";"))
    Trim(Part($EmailList, 2,";")), etc.
    corresponds to the 
    [Email 1]
    [Email 2]
    in the notification.
    I have over 20 emails that a user can select from.

    Thanks!

    ------------------------------
    Ed
    ------------------------------



  • 6.  RE: Parse an email from multi select list for notification

    Posted 17 days ago
    The formula should still work, but you would need to increment by 2 instead of by 1 for each email address that you need to pull out. So:

    Trim(Part(SearchAndReplace($EmailList,"-",";"), 2,";"))​ = [Email1]
    Trim(Part(SearchAndReplace($EmailList,"-",";"), 4,";"))​ = [Email2]
    etc

    Without knowing how you're using these or how your application is structured, have you thought about having these Emails as a separate table? It would require another table to act as a Many to Many between the Emails and the existing table, but you would have more flexibility in the future. You could also still pull the email addresses up through a Summary field.



    ------------------------------
    Blake Harrison
    bharrison@datablender.io
    DataBlender - Quick Base Solution Provider
    Atlanta GA
    404.800.1702 / http://datablender.io/
    ------------------------------



  • 7.  RE: Parse an email from multi select list for notification

    Posted 17 days ago
    Thanks Blake! That solved it. I considered a separate email address table but decided to keep it simple, since at this point I don't foresee a need for it. This particular list has non-user and distribution groups included. All other application requirements are for users only.
    Thanks again!

    ------------------------------
    Ed
    ------------------------------