The below scenario 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 contr

Here is the formula for the submit button:-

UpdateContext({varIsInProgressPrintForm: false});
        'PDF container',
        {ExpandContainers: true}
//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),"""","")});

        "Error Submitting the Print form",NotificationType.Error,10000)
//clear our the attahcment variaible so the other attachent will be shown

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


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 attached, 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:-


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

1 Answer 1


The provided code appears to be handling the creation and attachment of a PDF file to a list item in PowerApps. However, there seems to be an issue with attaching the PDF to the list item.

The code segments responsible for creating and attaching the PDF are as follows:

    PDF(`enter code here`
        'PDF container',
        {ExpandContainers: true}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.