cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Priyasantra
Microsoft
Microsoft

Send the comments in email body

Hello Experts, 

 

Hope you all are doing great, 

 

I have a requirement of how to send the value of the Multiple Lines of text in the email body.  I have a form which sends an email to the employee details (person or group field) when the "Send Assignment" button is clicked. The "OnSelect" property of the button is sends an email as follows, 

 

Button OnSelect --> Office365Outlook.SendEmailV2(ProcessTrainingGallery.Selected.'Employee Details'.Email, " First Task of Process Training", "Hello "& ProcessTrainingGallery.Selected.'Employee Details'.DisplayName &"<br> Please find the questions of your first assignment <br><br> Regards <br> ); SubmitForm(Form2)

 

Now I want that when the form is submitted or the email is sent it should also polpulate whatever I write inside the "Rich Text Editor". The Rich text editor is actually a Multiline of text field in sharepoint.  Screenshot of the form is attached below

 

Priyasantra_2-1612114149170.png

So as per the above screenshot my email should look like. 

 

"Hello "& ProcessTrainingGallery.Selected.'Employee Details'.DisplayName &"<br> Please find the questions of your first assignment

 

Assigment questions

 

First Task Assignment

 

Regards

Priya

 

Can someone help on how to Auto populate the value or the information typed in the Multiline of text field (Rich Text). in the  body of the email automatically once the form is submitted?

 

Requesting urgent help

 

Regards

Priya

 

 

 

 

 

 

 

 

 

 

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions

@Priyasantra ,

That's not the control you need ... Expand the datacard and you will find a control named smthg DataCardValue....

This is what we are looking for .

View solution in original post

Hi @gabibalaban 

 

This helped resolving my issue the highlighted below is something I was looking for

 

Priyasantra_0-1612121070933.png

Thanks a lot

View solution in original post

11 REPLIES 11
gabibalaban
Dual Super User
Dual Super User

Hi @Priyasantra ,

 

Well it's enough to use RichTextEditor.HtmlText property on formula.

Office365Outlook.SendEmailV2(sender,subject, RichTextEditor.HtmlText)

Actually personally I think it's better to use the formula on OnSuccess property of the form, after the succesfull submision of the form.

I hope i cleary understood your issue.

 

LRVinNC
Resident Rockstar
Resident Rockstar

Unless I am missing something, you can access the content of the rich text field as <RichTextEditor1>.HtmlText so you can simply add this to the string you are building above, where <RichTextEditor1> is replaced with the name of your rich text control.  

 

"Hello "& ProcessTrainingGallery.Selected.'Employee Details'.DisplayName &"<br> Please find the questions of your first assignment <br><br>" & RichTextEditor1.HtmlText & "<br><br> Regards <br> )

 

LRVinNC

------------------
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Hello @gabibalaban 

 

This has worked fine. I am sorry I cannot set this to "Onsuccess" Property because this single form as multiple Views based on the user and different properties. So there are multiple hidden buttons which pops up with conditional formatting. But the above solution has worked fine.

 

I have one last problem.  I have one last view and in that view I have a submit button screenshot attached.

 

Priyasantra_1-1612116359395.png

 The submit button is supposed to work as the above formula attached in the screenshot. So if you see the formula it has a concatenated the submited value(displayname) of  "buddy/mentor" filed. (Person or group.) But when the email is sent It doesnt sucessfully append the display name of this field and this remains blank. Please see the attached email which was sent to 

 

If you check the below screenshot it has the missing value of the mentor/buddy displayname. Could you please help me correct my formula 

 

Priyasantra_2-1612116624425.png

Currently the formula i am using is Office365Outlook.SendEmailV2(ProcessTrainingGallery.Selected.'Employee Details'.Email, "Process Training Completed", " Hello "&ProcessTrainingGallery.Selected.'Employee Details'.DisplayName&" You have completed your trainings successfully and You have been assigned with a new buddy to work and collaborate. Your new buddy/mentor is "&ProcessTrainingGallery.Selected.'Mentor/Buddy'.DisplayName&". Please click in this <a href = 'https://apps.preview.powerapps.com/play/22fc7b26-536d-4280-a296-c926d29xxxxxxxxx9?tenantId=72f988bf-... LINK</a> and acknowledge the Training Status as ONBOARDING COMPLETED.<br><br> Regards <br> PC-API", {Cc:"v-prsan@microsoft.com"}); SubmitForm('Process Form')

 

This does not shows any error. But could you please check the error and why its not auto populating the displayname of the buddy/Mentor field? However this formula has perfectly auto populated the display name of the 'Employee details' field.

 

Requesting this last help

 

Regards

Priya

 

 

LRVinNC
Resident Rockstar
Resident Rockstar

Use the formula bar to display what is actually in the DisplayName for the selected record similar to the way I displayed the contents of a table in this example.   If that is showing up as blank, then there is a problem with your data.

pwe.jpg

LRVinNC

------------------
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Hello @LRVinNC 

 

I am sorry I am just bit confused. I am a beginner and I am unsure of how to proceed. Could you please be little more precise about it?  It would be very helpful if you could help changing my formula here. -->  Office365Outlook.SendEmailV2(ProcessTrainingGallery.Selected.'Employee Details'.Email, "Process Training Completed", " Hello "&ProcessTrainingGallery.Selected.'Employee Details'.DisplayName&" You have completed your trainings successfully and You have been assigned with a new buddy to work and collaborate. Your new buddy/mentor is "&ProcessTrainingGallery.Selected.'Mentor/Buddy'.DisplayName&". Please click in this <a href = 'https://apps.preview.powerapps.com/play/22fc7b26-536d-4280-a296-c926d29xxxxxxxxx9?tenantId=72f988bf-... LINK</a> and acknowledge the Training Status as ONBOARDING COMPLETED.<br><br> Regards <br> PC-API", {Cc:"v-prsan@microsoft.com"}); SubmitForm('Process Form')

 

Regards

Priya

LRVinNC
Resident Rockstar
Resident Rockstar

I need to see what is actually in your ProcessTrainingGallery.Selected.'Mentor/Buddy'.DisplayName field so we can determine where the problem is coming from.  The formula seems to be OK.

Display the formula above in your formula window.

Highlight just ProcessTrainingGallery.Selected.'Mentor/Buddy'.DisplayName in that formula.  It should then either display the value of that field or show you a small downward facing arrow head that, if you click on it, will display a table or record containing the data.  

Screenshot what it shows you to be the data in that field.  

LRVinNC

------------------
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

@Priyasantra ,

The only explanation I have is that the 'Mentor / Buddy' column has no assigned value in your gallery. So my option to quickly solve the problem is to refer directly to the form control (comboBox  - most probably).

So, replace 
ProcessTrainingGallery.Selected.'Mentor/Buddy'.DisplayName 
with 
MentorBuddyComboBoxName.Selected.DisplayName
 
Hope it helps !
 
 
 

Hi @gabibalaban 

 

This gives error

 

Priyasantra_1-1612118971029.png

 

Regards

Priya

LRVinNC
Resident Rockstar
Resident Rockstar

You misspelled DisplayName.  

LRVinNC

------------------
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (1,909)