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({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 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