cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Lefty
Impactful Individual
Impactful Individual

Displaying a PDF icon in gallery to run a Power Automate flow

Hi,

I have a gallery showing my submitted items in my canvas app. I added an icon which would only be visible if the the status was completed. 

When clicked the OnSelect has the required values for the Flow to run to generate a PDF of the data.

The issue I have is on the gallery screen the record has not loaded for the PDF to generate any data, how do I overcome this please?

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Lefty :
You could check the length of the HTML Text, suppose the fixed HTML text length is 100, then you can consider the length less than or equal to 100 to be empty, and greater than 100 to be non-empty.

Best Regards,

Bof

View solution in original post

5 REPLIES 5
v-bofeng-msft
Community Support
Community Support

Hi @Lefty ,

 

I assume you refresh the data source after running the flow. Something like:

 

run.flowName();
Refresh(YourDataSource) 

 

I think this link will help you a lot:

Refresh 

 

Best Regards,

Bof

Lefty
Impactful Individual
Impactful Individual

Hi @v-bofeng-msft 

 

I probably did not explain myself.

On my gallery screen I can select previously submitted items. The data in the item is loaded when the user clicks an item in the gallery. The data is then captured in a HTMLText property which the flow uses to convert the data into PDF.

 

I wanted to have a button in the gallery next to each item, where the user can click it to generate a PDF, but the issue I believe is the data has not loaded so the flow cannot obtain values from the HTML, thus in turn cannot run. I guess what I am asking is, is there a way I can have a button on the gallery screen, or do I ultimately have to have the data loaded and put this button say on the final screen of my app, or at least after a user selects the item from the gallery and then on the next screen they have the button to generate the PDF?  This is the simpler option and I have this working. I wanted to know if at all it is possible to have this button on the gallery screen or not?

 

Thanks

Hi @Lefty ,

 

I think you could check if the value is empty or check the length of the HTML text before you run the flow.

For example, if there is no HTML value then disable the button:

you could set the button's DisplayMode property to:

If(IsBlank(TheHTMLText),DisplayMode.Disabled,DisplayMode.Edit)

 

Best Regards,

Bof

Lefty
Impactful Individual
Impactful Individual

@v-bofeng-msft 

Thanks but this doesn't work either as my HTML box is not empty, as it has titles of the fields at all times

Hi @Lefty :
You could check the length of the HTML Text, suppose the fixed HTML text length is 100, then you can consider the length less than or equal to 100 to be empty, and greater than 100 to be non-empty.

Best Regards,

Bof

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (1,109)