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

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
Community Support Team
Community Support Team

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
Community Support Team
Community Support Team

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

golabem
Level: Powered On

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
thirdimage

Power Automate 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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,001)