cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

Indepth Email from Power Apps? - Coding Issues

Hi there, 

 

I am attempting to create an in-depth email sent from power apps. 

 

Desired Message: 

"Team, 

 

Please Check the Tracking Application.

 

A new project has been created by (Username). 

 

Issue Raised By: 

Initiated By: 

Date: 

Item Description: 

Tool Serial Number: 

Job Number: 

 

Link: ----------------------------------

 

[PLEASE DO NOT REPLY TO THIS MESSAGE] "

 

Current coding I have: 

 

Office365Outlook.SendEmail("email@gmail.com", "New DBR Opened By " & User().FullName & "",

 

"Team,

 

Please Check the EUR BDT DBR Application.

A new DBR project has been created by " & User().FullName & ".")

 

 

I looked at videos on Youtube and hit a wall with the item function being used to get the data card info and link to work. 

 

Any help with this would be great, any tutorials people may know of would be helpful as well. 

 

Thanks. 

 

Key info: 

 

Data Cards info: 

Issue Raised By_DataCard2

Date_DataCard2

Item Description_DataCard2

Tool Serial Number_DataCard2

Job Number_DataCard2

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Indepth Email from Power Apps? - Coding Issues

Hi @Channah ,

I just spent some time doing a HTML page for you including a table

Team,<br>
<p><strong>Please Check the Tracking Application.</strong></p>

<p>A New project has been created by " & UserNameT.Text & "</p>  
<table width = '500'>
    <tr>
        <td width='250'><strong>Issue Raised By:</strong></td>
        <td width='250'>"& RaisedByT.Text & "</td>
    </tr>
    <tr>
        <td><strong>Initiated By:</strong></td>
        <td>" & InitiatedByT.Text & "<td>
    </tr>
        <td><strong>Date:</strong></td>
        <td>"  & Text(DateT.SelectedDate,LongDate) & "</td>
    <tr>
        <td><strong>Item Description:</strong></td>
        <td>" & DescriptionT.Text & "</td>
    </tr>
    <tr>
        <td><strong>Tool Serial Number:</strong></td>
        <td>" & ToolSNT.Text & "</td>
    </tr>
    <tr>
        <td><strong>Job Number:</strong></td>
        <td>" & JobNoT.Text & "</td>
    </tr>
</table>
<p>Click the link for <a href=https://powerusers.microsoft.com/t5/Building-Power-Apps/Indepth-Email-from-Power-Apps-Coding-Issues/m-p/455245#M135877> This Post</a></p>
<p>[PLEASE DO NOT REPLY TO THIS MESSAGE]</p>

You might as well have the App to (Attached).

 

Please click and accept as Solution if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a Thumbs Up.

 

View solution in original post

15 REPLIES 15
Highlighted
Dual Super User III
Dual Super User III

Re: Indepth Email from Power Apps? - Coding Issues

Hi @Channah 

 

Can you try to update the expressions to:

Office365Outlook.SendEmail("email@gmail.com", "New DBR Opened By " & User().FullName,"Team,

Please Check the EUR BDT DBR Application.

A new DBR project has been created by " & User().FullName & ".

Issue Raised By: "& IssueRaisedBy_DataCard2.Text &"

Initiated By: " & Initiatedby_DataCard2.Selected.ColumnName &"

Date: "& Date_DataCard2.SelectedDate &"

Item Description: "& ItemDescription_DataCard2.Text &"

Tool Serial Number: "& ToolSerialNumber_DataCard2.Text &"

Job Number: "& JobNumber_DataCard2.Text &"

 

Link: ----------------------------------

 

[PLEASE DO NOT REPLY TO THIS MESSAGE] "
)

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Highlighted
Super User
Super User

Re: Indepth Email from Power Apps? - Coding Issues

Hi @Channah ,

I just spent some time doing a HTML page for you including a table

Team,<br>
<p><strong>Please Check the Tracking Application.</strong></p>

<p>A New project has been created by " & UserNameT.Text & "</p>  
<table width = '500'>
    <tr>
        <td width='250'><strong>Issue Raised By:</strong></td>
        <td width='250'>"& RaisedByT.Text & "</td>
    </tr>
    <tr>
        <td><strong>Initiated By:</strong></td>
        <td>" & InitiatedByT.Text & "<td>
    </tr>
        <td><strong>Date:</strong></td>
        <td>"  & Text(DateT.SelectedDate,LongDate) & "</td>
    <tr>
        <td><strong>Item Description:</strong></td>
        <td>" & DescriptionT.Text & "</td>
    </tr>
    <tr>
        <td><strong>Tool Serial Number:</strong></td>
        <td>" & ToolSNT.Text & "</td>
    </tr>
    <tr>
        <td><strong>Job Number:</strong></td>
        <td>" & JobNoT.Text & "</td>
    </tr>
</table>
<p>Click the link for <a href=https://powerusers.microsoft.com/t5/Building-Power-Apps/Indepth-Email-from-Power-Apps-Coding-Issues/m-p/455245#M135877> This Post</a></p>
<p>[PLEASE DO NOT REPLY TO THIS MESSAGE]</p>

You might as well have the App to (Attached).

 

Please click and accept as Solution if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a Thumbs Up.

 

View solution in original post

Highlighted
Helper II
Helper II

Re: Indepth Email from Power Apps? - Coding Issues

Hi WarrenBelz, 

 

This looks great but I have no idea how to implement the HTML code. 

 

I'm new to power apps and haven't used HTML before. 

 

Is there any way you could show me how to implement this?

 

Thanks

Highlighted
Super User
Super User

Re: Indepth Email from Power Apps? - Coding Issues

Hi @Channah ,

Create a HTML text box (Insert > Text > HTML Text) on a new screen, expand it and post what I given you between quotes "".

You will need to change the ".Text" field names to yours before you see the output on the screen and then of course the header names to your own.

All you have to do then is send it (I will call it MailBody) - MailBody.HTMLText as the body of your email.

 

 

Please click and accept as Solution if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a Thumbs Up.

Highlighted
Helper II
Helper II

Re: Indepth Email from Power Apps? - Coding Issues

I'm sorry but still struggling.

 

where do I find the ".Text" for my app is this the Data card names, Data Card Keys, names of title's in the sharepoint list? I'm just not sure.

 

Are the headers the names of the columns in the sharepoint list?  

 

 

Highlighted
Helper II
Helper II

Re: Indepth Email from Power Apps? - Coding Issues

Hi thanks for the reply, 

 

Still having some issues with the coding and some errors popping up. 

 

Are you able to help with this? 

 

Thanks

 

Pictures Attached

Highlighted
Super User
Super User

Re: Indepth Email from Power Apps? - Coding Issues

Hi @Channah ,

The .Text (or .Selected if a drop down) are your control names (input fields) in PowerApps.

You just need to add your headers in place of the ones there.

 

 

Please click and accept as Solution if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a Thumbs Up.

Highlighted
Helper II
Helper II

Re: Indepth Email from Power Apps? - Coding Issues

Sorry still getting errors. 

 

pictures attached, don't know what goes in place of the .text or the .selected 

Highlighted
Super User
Super User

Re: Indepth Email from Power Apps? - Coding Issues

Hi @Channah ,

Firstly, go to the bottom of the post and download HTMLEmailforPAGroup_20200129073826.zip.

This is the demo app I put together. Go to "Apps" in PowerApps and select "Import Canvas App" at the top, navigate to the zip file then choose "Upload",  then "Import" and you should see it in your list. Put in some input then have a look at the field names and how they show in the HTML.

What you need to do to make all this valid is simply insert your field names where I have the examples (eg InitiatedBy.Text would be whatever your control name is, followed by its type (Text Boxes are .Text, Date Pickers are .SelectedDate and Drop downs/Combo boxes are .Selected.<Something>

Generally .Selected.Value, but can be .Selected.Result if from a Distinct query of .Selected.<FieldName> if from a collection.

If you look in the bottom panel after your type in the 'dot" after Selected, you will see the valid values for that  control.

The issue you have is not learning HTML (the code I sent is already valid), just produce a valid Concatenated string for the HTML to render. One last thing - make sure you put the whole code in the example inside single quotes ".

Helpful resources

Announcements
Check this Out

Announcing

Class of 2020- Season 2

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,258)