web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Submit Form, On Sucess...
Power Apps
Unanswered

Submit Form, On Sucesss of Form Sending emails from previous Submitted Form

(0) ShareShare
ReportReport
Posted on by 920 Super User 2024 Season 1

Hi,

 

I have a button that submits my form, then on sucess it sends an email, however it is sending the details of the previously submitted form. 

 

Can anyone help with this?

 

OnSuccess - 

 

Set(gblRecordID, Self.LastSubmit.ID);

 

Office365Outlook.SendEmailV2(Self.LastSubmit.'Lead_three',"Please review - 2024-" & Self.LastSubmit.ID & " - " & Self.LastSubmit.Segment_two.Value,


"Hi " & Self.LastSubmit.'Lead_three' & "," &

"<br><br>A request was created for your review:<br><br>

<b>Ticket Number: &nbsp</b>"&DataCardValue54.Text&" <br><br>
<b>Type of Request: &nbsp</b>"&DataCardValue15.Selected.Value&" <br><br>
<b>Request Details: &nbsp</b>"&DataCardValue26.Text&" <br><br>

Thanks.

", {Cc:Self.LastSubmit.Requestor_Email_two})

 

where am i going wrong? 

Categories:
I have the same question (0)
  • wonka1234 Profile Picture
    920 Super User 2024 Season 1 on at

    bump

  • WarrenBelz Profile Picture
    153,717 Most Valuable Professional on at

    Hi @wonka1234 ,

    Where are the control values coming from ? You might try this using the values you have just submitted.

    Set(
    	gblRecord, 
    	Self.LastSubmit
    );
    Office365Outlook.SendEmailV2(
    	gblRecord.'Lead_three',
    	"Please review - 2024-" & gblRecord.ID & " - " & gblRecord.Segment_two.Value,
    	"Hi " & gblRecord.'Lead_three' & "," &
    	"<br><br>A request was created for your review:<br><br>
    	<b>Ticket Number: &nbsp;</b>" & gblRecord.TicketNumberField & "<br><br>
    	<b>Type of Request: &nbsp;</b>" & gblRecord.RequestTypeField & "<br><br>
    	<b>Request Details: &nbsp;</b>" & gblRecord.DetailsField & "<br><br>	
    	Thanks.", 
    	{Cc:gblRecord.Requestor_Email_two}
    )

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • wonka1234 Profile Picture
    920 Super User 2024 Season 1 on at

    @WarrenBelz  values are coming from EditForm1.

    I see the record created in the sharepoint list.

    When you set(gblRecordID, Self.LastSubmit) - it is causing an error.

    I have to use Self.LastSubmit.ID

  • WarrenBelz Profile Picture
    153,717 Most Valuable Professional on at

    @wonka1234 ,

    What I posted was gblRecord, not gblRecordID.

  • wonka1234 Profile Picture
    920 Super User 2024 Season 1 on at

    Sorry thought you were making a change to what i had!

     

    ill try out what you had - but why cant I use this instead - 

     

    EditForm1.LastSubmit.Field.

     

    Wont this work? Whats the difference ?

  • WarrenBelz Profile Picture
    153,717 Most Valuable Professional on at

    @wonka1234 ,

    What I posted is a different approach saving the entire record instead of just the ID. It then allows easy referencing of every field you have just posted.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Kalathiya Profile Picture

Kalathiya 445

#2
WarrenBelz Profile Picture

WarrenBelz 386 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 321 Super User 2025 Season 2

Last 30 days Overall leaderboard