cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
w4schba3r
Frequent Visitor

Create Column that brings together all emails

Hi everyone,

 

I have just started my Power Apps journey and am building my first app with a sharepoint list as a data source.

 

Within the app, new projects can be created with several fields to be filled. After everything is saved, an email should be sent out that confirms the information entered to everyone involved in the project.

Therefore I would require an additional column that includes all of the following email addresses:

 

- Email of Creator (based on automatically created Column "Created by")

- Email of Project Owner (based on Column "Project Owner" that is specified as a "Person" type in SP)

- Email of Project Deputy (based on Column "Project Deputy" that is specified as a "Person" type in SP)

- Emails of Admins (separate SP list with 5 users that should be part of any email)

 

What would be the best way to concatenate all those email addresses in one column to then use for further communication? 

 

Thank you so much in advance for your help! 

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@w4schba3r 

Are you actually looking to store this in a column, or just need to use it within the app to generate an email?

 

At either rate, you simply need to concatenate all the values you want together and either use in the app or store in a column if you need long-term storage.

 

Are you doing this as part of a form submit, or do you have some other mechanism in place to store the primary data?

 

If it is from a Form (recommended), then in your OnSuccess action of the form you can perform a formula such as this:

With(Self.LastSumbit,
    With({emailTo:
        Concat([
            'Created by'.Email,
            'Project Owner'.Email,
            'Project Deputy'.Email,
            "list of other semicolon separated emails"
            ],
            Value, ";"
        )},

        Office365Outlook.SendEmailV2(
            emailTo,
            "Subject",
            "Email Body"
        )
    )
)

 

If you need to do it in a column, then I would simply do this within the form for the column you want to store the data in.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

3 REPLIES 3
RandyHayes
Super User
Super User

@w4schba3r 

Are you actually looking to store this in a column, or just need to use it within the app to generate an email?

 

At either rate, you simply need to concatenate all the values you want together and either use in the app or store in a column if you need long-term storage.

 

Are you doing this as part of a form submit, or do you have some other mechanism in place to store the primary data?

 

If it is from a Form (recommended), then in your OnSuccess action of the form you can perform a formula such as this:

With(Self.LastSumbit,
    With({emailTo:
        Concat([
            'Created by'.Email,
            'Project Owner'.Email,
            'Project Deputy'.Email,
            "list of other semicolon separated emails"
            ],
            Value, ";"
        )},

        Office365Outlook.SendEmailV2(
            emailTo,
            "Subject",
            "Email Body"
        )
    )
)

 

If you need to do it in a column, then I would simply do this within the form for the column you want to store the data in.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
AhmedSalih
Continued Contributor
Continued Contributor

@w4schba3r , I would concatenate them with semicolon. You can then use the value of that field in the TO field in Power Automate Send Email Action for example or you might need to use the Split function  to break them into a table of substrings.

 

 

Hey, I still have some issue with the formula - it does not allow me to select the .Email - i currently just tried for the following two fields:

 

With(Self.LastSumbit,
    With({emailTo:
        Concat([
            'Table'.'Deputy Owner'.Email;
            'Table'.'Guarantee Owner'.Email],
            Value, ";"
        )},

        Office365Outlook.SendEmailV2(
            emailTo,
            "Subject",
            "Email Body"
        )
    )
)

The following error occurs but I could not solve it, do you know what could be the reason for this?

 

w4schba3r_0-1652859555750.png

Thank you guys so much already for your help! 🙂

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (2,129)