cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate II
Advocate II

Create pdf from Html text - result pdf captures wrong data

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

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Create pdf from Html text - result pdf captures wrong data

Hi @golabem ,

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 Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Highlighted
Community Support
Community Support

Re: Create pdf from Html text - result pdf captures wrong data

Hi @golabem ,

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 Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Advocate II
Advocate II

Re: Create pdf from Html text - result pdf captures wrong data

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.

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Users online (4,721)