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

Returned value from patch is empty

Hi everyone,

I need to utilize the ID of a newly created record immediately after patching. I manage to write it in a text box, but when I try to add it in a mail immediatly after the patch, the value is empty.

The process is as follows:

- User fills in input and presses OK when finished
- The button "OK" patches to a SQL server and saves information from patch in a collection.
- Ideally, the press on OK also triggers a mail that sends a link that includes the ID to another user.

However, the values in the mail are empty - it seems like powerapps is too slow saving the information in the collection, so that the reference returns an empty value from the collection (I have checked the flow sending the email and the input is empty). I have tested to simply write the results from the collection in a textbox in my app and the values are shown here after patching - hence, I do not think my code is the problem.

Any idea/workaround to how I can manage to add this information to the mail immediatly after patching?

1 REPLY 1
Dual Super User
Dual Super User

Re: Returned value from patch is empty

Hi @tfarsund 

 

Assuming you are setting the response in a variable

 

example:

 

Set(varResult, Patch ...) ; sendemail

 

in send email you can use the variable and it should work

 

another option would be to trigger a timer after patch and then on timer complete you can send the email (timer will act like a delay)

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

 

 

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (3,862)