Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Experimental Features
Suggested answer

PDF Functionality - picking up incorrect information

(0) ShareShare
ReportReport
Posted on by 231
Hi,
 
I have an app that allows users to submit vendor payment requests. Upon selecting the submit button, a PDF of the form is generated automatically. On random occasions we have been noticing that the PDF generates incorrectly and it is reflecting the information inputted by the user of a previous request. I am not sure how this is possible if the PDF workflow is picking up the correct ID of the request.  We have seen this happening in high volumes of requests but also noticed on slow days it still happens.
 
Any thoughts on this issue?
  • Suggested answer
    SwatiSTW Profile Picture
    592 Super User 2025 Season 1 on at
    PDF Functionality - picking up incorrect information
    The issue is that sometimes the PDF shows data from a previous request instead of the current one. This happens because the app or flow picks up old or incorrect data due to timing or variable handling issues.
     
    1. Make sure the form is submitted and saved before generating the PDF
    SubmitForm(Form1);
    If(Form1.Valid,
       Set(varCurrentID, Form1.LastSubmit.ID);
       // Start PDF logic here
    )
    1. In Power Automate, do not use input data directly. Instead, use the ID from Power Apps and fetch the latest data
      Use "Get item" action (for SharePoint) or "Get row" (for Dataverse) based on the ID you received
    2. Do not generate PDF immediately after submit without checking if submit was successful
    3. Avoid using global variables to store form data unless you reset them after each use
    Set(varFormData, Blank())
    1. Reset the form after submit to clear previous values
    ResetForm(Form1)
    1. In Power Automate, log the received ID and output data to a SharePoint list or file to trace errors if needed
    This will ensure the PDF picks up only the current request's data and not any old or cached value.

     

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 770 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 494

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 399

Featured topics