Hi,
I use this formula below to save PDF as attachment on a sharepoint list.
REPONSEBVPDF1.Run({file:{name:Label22.Text&".pdf";contentBytes:PDF(ReponseBV;{ExpandContainers:true})}})
But with this formula it only creates an element on my sharepoint list without save my PDF file as attachment.
if i replace on this formula Label22.Text&"pdf" by "test.pdf" the file is attached correctly to my sharepoint list.
The issue i have is that i need to get the text which is located to the Label22.Text on another screen
@Sormick ,
That is exactly what I tried to do with my last post - With() produces a temporary Variable
Finally i found what is causing this issue.
This only works with variables but not with labels text.
Now it works!
OK - one last attempt as this is making no sense
With(
{
_Name: SELECTEDTEXTE & ".pdf";
_PDF: PDF(ReponseBV;{ExpandContainers:true})
};
REPONSEBVPDF1.Run(
{
file:
{
name: _Name;
contentBytes: _PDF
}
}
)
)
Hello,
I confirm i can see the filename of the variable SELECTEDTEXTE on the label22.text
On the sharepoint list i can see the filename on the new created record but the PDF file is not attached to this record.
if i replace this variable on REPONSEBVPDF1.Run({file:{name:SELECTEDTEXTE&".pdf";contentBytes:PDF(ReponseBV;{ExpandContainers:true})}}) to REPONSEBVPDF1.Run({file:{name:"TEST.pdf";contentBytes:PDF(ReponseBV;{ExpandContainers:true})}}) now the PDF is added as attachment on my sharepoint list.
but i need to get the text on this variable. I don't know how to rectify this.
@Sormick ,
If you look in the Variable SELECTEDTEXTE (put it on a Label), do you see the file name ?
Hello, Any idea how to store my screen content as PDF file on a sharepoint list with filename from the Variable Above?
Please find here one the the variables i entered to the label.22.text:
Set(SELECTEDTEXTE;DataTable1.Selected.'Grand Tag')
If i add this variable! SELECTEDTEXTE to REPONSEBVPDF1.Run({file:{name:SELECTEDTEXTE&".pdf";contentBytes:PDF(ReponseBV;{ExpandContainers:true})}})
the file is not added as attachment on the sharepoint list.
this variable was added on the label22.text on the "text" field.
Hi @Sormick ,
Is Label22 a calculated label ? If so maybe create a Variable with the calculation when whatever creates it is input and then use the Variable in the file name.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
MVP (Business Applications) Visit my blog Practical Power Apps
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.