cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Faisal_Nabi
Level: Powered On

Problem: Sending the text twice in the email.

Hey guys. I need a help. I've made a leave_form in which when a user press the submit button it creates the tabels in sharepoint and sends the mail to the manager. The problem is that in the mail it is sending the leaveform detail more than once which I dont want to have. I've found the problem but I dont know how to solve it. The problem which I found is in the sharepoint. What happens is that when ever User sumbit the form it creates the table in sharepoint and counts the total rows and sends the mail to the users more than once. I've attach the screen shots.The first picture shows the code for submit button and the other is the problem which I'm getting in the mail.ThanksScreen Shot 2019-07-13 at 6.48.57 pm.pngScreen Shot 2019-07-13 at 6.51.37 pm.png

2 REPLIES 2
Super User
Super User

Re: Problem: Sending the text twice in the email.

Have you tried using the Concatenate( ) instead of Concat()? To test it out all you would have to do is change Concat() to Concatenate( ) and remove the first parameter Forms_1.



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
Community Support Team
Community Support Team

Re: Problem: Sending the text twice in the email.

Hi @Faisal_Nabi ,

Based on the issue that you mentioned, I think this issue is related to the Concat function you used within your app.

 

The Concat function is used to concatenates the result of a formula applied across all the records of a table, resulting in a single string. On your side, it is not necessary to use Concat function to concatenate the strings.

As an fixed solution, please consider remove the Concat function from your Office365.SendEmail() formula. You should modify your formula as below:

Office365.SendEmail(
                                 "faisaln908@mail.com",
                                 "Leave Form",
                                 "First Name: " & DataCardValue10.Text & Char(10) & 
"Last Name: " & DataCardValue11.Text & Char(10) &
"Email: " & DataCardValue21.Text & Char(10) &
.... &
" Reason for Absence: " & Char(10) & DataCardValue16.Text & Char(10) ); SubmitForm(Form2); ResetForm(Form2); ...

 

In addition, you could also consider use the Concatenate function to concatenate the string instead of the Concat function:

Office365.SendEmail(
                                 "faisaln908@mail.com",
                                 "Leave Form",
                                 Concatenate(
"First Name: ", DataCardValue10.Text, Char(10) ,
"Last Name: ", DataCardValue11.Text, Char(10),
"Email: " , DataCardValue21.Text , Char(10) ,
....,
" Reason for Absence: " , Char(10) , DataCardValue16.Text , Char(10)
) ); SubmitForm(Form2); ResetForm(Form2); ...

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Users Online
Currently online: 43 members 4,980 guests
Recent signins:
Please welcome our newest community members: