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 / why generating a PDF a...
Power Apps
Unanswered

why generating a PDF and attach it to sharepoint list item is no longer working

(0) ShareShare
ReportReport
Posted on by 1,875 Season of Giving Solutions 2025

The below was working well yesterday but stopped working today.

 

I have a submit button to generate a PDF for a container >> then add the generated PDF inside the list item attachment control.

 

Here is the formula for the submit button:-

 

UpdateContext({varIsDraftPrintForm:true});
UpdateContext({varIsRejectedPrintForm:false});
UpdateContext({varIsInProgressPrintForm: false});
Notify("3",NotificationType.Information);
Set(
 varWorkOrderPDF,
 PDF(
 'PDF container',
 {ExpandContainers: true}
 )
);
Notify("4",NotificationType.Information);
//the file to be added asa list item attachment
Set(varAttachment, { DisplayName: Substitute("Print Job" & Text(Now(),"yyyy-mmm-dd hh:mmm AM/PM") & ".pdf", ":","_"), Id: Substitute("Print Job" & Text(Now(),"yyyy-mmm-dd hh:mmm AM/PM") & ".pdf",":","_"), Value: Substitute(JSON(varWorkOrderPDF,JSONFormat.IncludeBinaryData),"""","")});
Notify("5",NotificationType.Information);

IfError(
SubmitForm(PrintFormForm);Notify("6",NotificationType.Information);,
 Notify(
 "Error Submitting the Print form",NotificationType.Error,10000)
 );
//clear our the attahcment variaible so the other attachent will be shown
Set(varAttachment,Blank());

 

and i set the following property inside the Attachment control item property:-

 

 

If(IsBlank(varAttachment),Parent.Default,varAttachment)

 

 

yesterday when i click on the submit button >> the PDF  will get generated and the form will be submitted then show the generated PDF as an attachment. also if there are other attachments, and i click on the submit button >> the list item attachments control will be cleared out temporary till the PDF is generated , then once i clear the varAttachment variable (last formula in my code), then old attachments and the new pdf will appear inside the attachment control.

 

but today when i click on the submit button, the form will be submitted, but the pdf will not get attached to the list item attachment control...., and i added the notification for debugging, where the wired thing also is that the notification message =""5 " will not be shown, here is the notifications when i click on the submit button:-

 

johnjohnPter_0-1700523266502.png

any advice what is going on ? again this was working well yesterday and all the previous week. not sure why the PDF is no longer get attached to the list item

Categories:
I have the same question (0)

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,027

#2
Valantis Profile Picture

Valantis 644

#3
11manish Profile Picture

11manish 626

Last 30 days Overall leaderboard