cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
panand99
Level 10

Send email with SubmitForm Issue

Hi All,

 

I tried to send the email and submits the form on same action but failed.

I used powerapps button action to send email and then SubmitForm() but got the field validation error. I click on submit the form after entring the values but it then blank out the value on title field.

 

Submit button OnSelect: PowerAppsRequest.Run(User().Email,textBody.Text  & Proper(User().FullName),"Document Created - Subject -" & Req_Title.Text,DataCardValue39.Text); SubmitForm(frmEditRequest) 

 

Error : TitleError.png

 

If I only submitForm, it will submit but with the email, it is not working. (Email sent to user but form not saved)

I used Office365.SendEmail and then submits form but the same issue.

 

Any help will be appreciated.

 

Thanks,

 

I used to send email on OnSuccess event of form but it is not sent.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Send email with SubmitForm Issue

Hi @panand99,

Do you fire a flow to send an email via clicking the "Submit" button?

I have made a test on my side, and don't have the issue that you mentioned. The screenshot as below:9.JPG

 

10.JPG

Please take a try to execute your PowerAppsRequest.Run() function separately, and then check if the email sent well.

In addition, please consider take a try to submit your form data into your SP list using Patch function instead of SubmitForm function, then try your formula again, check if the issue is solved. Please modify your formula as below:

PowerAppsRequest.Run(
      User().Email,
      textBody.Text  & Proper(User().FullName),
      "Document Created - Subject -" & Req_Title.Text,
      DataCardValue39.Text
);
Patch(
    'YourSPList',
     Defaults('YourSPList'),
     frmEditRequest.Updates
)

If the issue still exists, please consider take a try to re-create a new app, and add your flow connection within it, then try it again, check if the issue is solved.

 

Best regards,

Kris

 

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.
5 REPLIES 5
johnsonjohn
Level: Powered On

Re: Send email with SubmitForm Issue

Can you explain the issue a bit more?

Where are you trying to save the form?

If it's in SharePoint List, then edit list settings and set the title to not required. As of now, the title field is mandatory

 

Highlighted
panand99
Level 10

Re: Send email with SubmitForm Issue

I tried to save form in sharepoint online list. If I remove the validation of "Title" then it is not saved the value in it.

johnsonjohn
Level: Powered On

Re: Send email with SubmitForm Issue

If you want a title, Make sure that you did add the parameter for the title in flow sequence (Ask in Power App) and pass a value successfully. 

panand99
Level 10

Re: Send email with SubmitForm Issue

Actually, This is not the issue. My email is not sent when I used this formula:

 

Submit button OnSelect: PowerAppsRequest.Run(User().Email,textBody.Text  & Proper(User().FullName),"Document Created - Subject -" & Req_Title.Text,DataCardValue39.Text); SubmitForm(frmEditRequest) 

Community Support Team
Community Support Team

Re: Send email with SubmitForm Issue

Hi @panand99,

Do you fire a flow to send an email via clicking the "Submit" button?

I have made a test on my side, and don't have the issue that you mentioned. The screenshot as below:9.JPG

 

10.JPG

Please take a try to execute your PowerAppsRequest.Run() function separately, and then check if the email sent well.

In addition, please consider take a try to submit your form data into your SP list using Patch function instead of SubmitForm function, then try your formula again, check if the issue is solved. Please modify your formula as below:

PowerAppsRequest.Run(
      User().Email,
      textBody.Text  & Proper(User().FullName),
      "Document Created - Subject -" & Req_Title.Text,
      DataCardValue39.Text
);
Patch(
    'YourSPList',
     Defaults('YourSPList'),
     frmEditRequest.Updates
)

If the issue still exists, please consider take a try to re-create a new app, and add your flow connection within it, then try it again, check if the issue is solved.

 

Best regards,

Kris

 

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

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

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

Top Kudoed Authors
Users Online
Currently online: 290 members 5,174 guests
Please welcome our newest community members: