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 / Saving Attachments to ...
Power Apps
Answered

Saving Attachments to Sharepoint list working Offline

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello everyone,

 

I've read planty content about the trouble i'm facing  and even though i couldn't solve it.

 

I have an app made from a Sharepoint List working offline that stores data locally and when the devide is connected the data is sent to the SharePoint List. But my field that sents the attachment is no working.

 

I Have a button to store data that ON SELECT runs this code:

if(Connection.Connected;SubmitForm(EditForm1);Collect(arrtemp;{tempTítulo:DataCardValue9.Text;tempObs:DataCardValue16.Text;tempAttachment:DataCardValue27.attachments;tempnovo:varNovo});;SaveData(arrtemp;"Localtemp"));;ClearCollect(arrHistóricos;Históricos);;Back()

 

Then, to send it to the server i have the code below:

 

ForAll(arrtemp;If(tempnovo = true;Patch(Históricos;{};{Título:tempTítulo;Observação:tempObs;Attachment:tempAttachment;});Patch(Históricos;LookUp(Históricos;Título=tempTítulo);{Título:tempTítulo;Observação:tempObs;Attachment:tempAttachment)));;Clear(arrtemp);;SaveData(arrtemp;"Localtemp");;ClearCollect(arrHistóricos;Históricos)

 

I don't have an idea how to solve this. if someone could help me i would appreciate.

 

Thanks,

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    156,460 Most Valuable Professional on at

    Hi @Anonymous ,

    The only way to save attachments files from the Attachment Control unfortunately is SubmitForm while online.

     

    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.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello @WarrenBelz ,

     

    Thanks for the reply.

     

    Do you know if there is an alternative to work on this?

     

    Best regards,

  • WarrenBelz Profile Picture
    156,460 Most Valuable Professional on at

    Hi @Anonymous ,

    Other than pictures, which can be saved in a collection, but then they are generally written to a Library.

    Attachments are an on-line facility only.

     

    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.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @WarrenBelz,

     

    The attachments i was trying to save was actually pictures taking from sites. So i think it can work.

     

    I'm a noob on this. How could i make it?

     

    Thnaks again!

     

    Best regards,

     

     

  • Verified answer
    WarrenBelz Profile Picture
    156,460 Most Valuable Professional on at

    Hi @Anonymous ,

    Here is a very good blog on this.and a bit more on this post. I am happy to help with any code you get stuck on after you have produced your model.

     

    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.

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @WarrenBelz,

     

    I've read the contents you sent me.  But i still need clarify some things.

     

    First, let me introduce a necessity. This app has the propose to collect data to maintenence, we have a list of equipments or places to visit and those items must to be in the app for user selection. That is easy with a forms.

     

    But i also need a Picture that goes together with this data of a place/equipment that i already have in the form.

     

    So the camera should be inside the form, or something like it, to send the Picture together with the form, because they are related and the examples for what i undestand, are sent images without this link.

     

    Sorry if i misunderstand something, but it seens very complex for my low experience.

     

    If you could help me to find a solution to this, i appreciate.

     

    Thanks!

     

     

  • Verified answer
    WarrenBelz Profile Picture
    156,460 Most Valuable Professional on at

    Hi @Anonymous ,

    I assume by Form you are referring to a standard Power Apps form?

    By "inside" - you are wanting to display the photo (or Photos) belonging to that form?
    I generally have a "camera" screen and file the photo in a SharePoint Library. These can be displayed in a gallery on the same screen as below

    P2PhotoShow.png

    I am just showing you what is possible (in a process very similar to yours) as this was your question. You have a bit of work on code in front of you. Here are a couple of good videos from Shane Young and Paul O'Flaherty.

     

    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.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @WarrenBelz ,

     

    I tried to copy exacly the same code as MIKAEL SVENSON in the link you proposed.

     

    https://www.techmikael.com/2017/05/saving-collection-of-images-from.html

     

    But in Power Apps i'm struggling to understand the error on the code in my function ON SELECT that sends data to server runs:

     

    ForAll(PictureColl;Collect(SubmitData; { filename: Concatenate(Text( Now(); DateTimeFormat.LongDate );Mid("0123456789ABCDEFGHIJKLMNOPQRTSUVWXYZ"; 1 + RoundDown(Rand() * 36, 0); 1);Mid("0123456789ABCDEFGHIJKLMNOPQRTSUVWXYZ"; 1 + RoundDown(Rand() * 36; 0); 1);".jpg"); filebody: Url }));;SaveImages.Run(Concat(SubmitData; filename & "|" & filebody & "#"))

     

    The error presented is that this function needs an operator.

     

    The only thing i have changed is the , for ; and ; for ;;, due the language difference.

     

    i've attached the code proposed for information.

     

    If you could help me i would really appreciate.

     

    Best regards,

    His Code.PNG
  • WarrenBelz Profile Picture
    156,460 Most Valuable Professional on at

    Hi @Anonymous ,

    Can you please pull this apart and tell me where the error is. I also use a different method to this.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello @WarrenBelz 

     

    Actually the mistake in the formula ON SELECT is that the flow created on Power Automate is not being recognized. It is unsupported or unknown.

     

    SaveImages.Run(Concat(SubmitData; filename & "|" & filebody & "#"))

     

    Thanks for the support.

     

    Best regards,

     

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard