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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Create pdf from Html t...
Power Apps
Answered

Create pdf from Html text - result pdf captures wrong data

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello,

 

I have custom form app based on sharepoint list in powerApps.

My flow converts html text from powerapps to pdf version of submited form. The trigger is standard save button.

My problem is that, when I submit new form, flow always captures wrong data, instead of what I entered, and saved into sharepoint list.

 

For example:

Most of fields are Parent.Default, and flows always capture data from my first item on sharepoint list (thats what I see in powerapps studio no matter how many items on list I have).

One of my fields are non-editable with formula on default Last(sharepointlist).columnName + 1 . And flow gets exactly this value - if my last list item was No4 (which I want inside of my created pdf), flow captures value No5.

 

I think maybe it is somehow connected with reseting form, or Item property of SharePointForm1, but I dont know how to fix this.

 

Here is my code for SharePointIntegration and SharePointForm1:

SharePointIntegration:
OnNew: NewForm(SharePointForm1);
OnSave: SubmitForm(SharePointForm1);

SharePointForm1:
OnSuccess: createPDF_flow.Run(main.HtmlText, SharePointForm1.LastSubmit.ID);
 RequestHide();
Item: If(
 IsBlank(SharePointIntegration.Selected) || IsEmpty(SharePointIntegration.Selected),
 First(sharepointlist),
 SharePointIntegration.Selected
)

 

I'm sure flow configuration is 100% okay, because when I check successful flows, it captures bad data on beginning (on trigger "PowerApps").

Do you know how to handle this error ?

 

Thank you

Categories:
I have the same question (0)
  • Verified answer
    v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    Do you mean that no matter how many records in the list, the flow always capture data from first item?

    So is the problem about this formula?

    createPDF_flow.Run(main.HtmlText, SharePointForm1.LastSubmit.ID);

    The parameter used in flow always is the first item's ID.

    Am I right?

     Maybe you could try this:

    createPDF_flow.Run(main.HtmlText, Last(Sort(listname,Created)).ID)

     

    Actually, if you could show me details about how do your flow capture data, it will be better.

     

     

    Best regards,

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I put the flow trigger to OnSubmit formula, it started working. I modified flow to create two different files ( captures two HTML text variables from powerapps ), and it crashed. I went back to 1 file and it crashed. I went back to put flow trigger to OnSucces and it started working. 

    Sometimes building flows and connecting it to powerapps is like building house of cards. I have completely no idea what happened. 

     

    Anyway, problem solved. For now.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 401 Most Valuable Professional

#2
11manish Profile Picture

11manish 201 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard