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?