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 / Save photos related to...
Power Apps
Suggested Answer

Save photos related to a Sharepoint List in a Sharepoint library

(1) ShareShare
ReportReport
Posted on by 18
I have an application that I use to make observations. The data is saved in a Sharepoint list (ObservacionesArqCom) using the 'Patch' function and the photos in a Sharepoint Library (BObservaciones) using a PowerAutomate flow, both are joined by the list ID that I get by creating a variable.
 
My problem is that I want to generate several observations at the same time and when I try I don't know how to join the information that is saved in the list with the photos that are saved in the library because it takes the variable as if it were a table. Here is the flow.
 
 
Categories:
I have the same question (0)
  • RW-30121623-0 Profile Picture
    4 on at
    A couple comments...
    I have an audit app which is a series of questions (observations) that need to be answered and written to a SharePoint list.  In my case they are all associated with a particular audit event.  Rather than using ForAll I simply use the collect function to patch to the SharePoint List.
     
    Collect(AuditResponses,DropColumns(Filter(CollResponses,Selected = true),
            //"FKAuditGID",
            Selected,
            ID,
            ResponseSequence
    ));
     
    Regarding above...
    -AuditResponses is the SharePoint list which is being patched with the multiple items in the collection.  The DropColumns it to get rid of some extra columns that are used in the app but not needed in the list.  Specifically, you want the Collection to match the list columns. By not passing an "ID" it creates new records.
    -As part of the AuditResponse SharePoint list I have a column "GID" which is a unique Identifier.  I use this rather than relying on the system generated ID.  This way I know it ahead of time.
    -CollResponses is the collection of responses that is collected in the app during the audit (observation opportunity in your case).  Contains the GUID as mentioned.
    -FKAuditGID is the unique ID of the parent audit event. Don't know if you would need something like this.
     
    I do this rather than using ForAll and going through and patching individually.  I think it performs better, less network traffic, so I have read.
    as mentioned, I also assign each audit response (observation in your case) a unique ID (GUID) rather than relying on the List generated ID (which you don't have prior to record being generated). 
     
    It appears your images are collected in ColImages.  Perhaps if as part of this collection you recorded the app generated ID (GUID) of the particular observation and passed to the flow this would, with some modifications, allow the flow to work as you go through all the records in the ForAll that is triggering the flow.
     
    I am making some assumptions. 
    -Each image is tied to one and only one observation.
    -You have ability to add a column to the document library, specifically the app generated ID (GUID or some other unique string).  This would be updated in the Update file properties in your above flow.
     
    First time posting here.  Know I didn't directly answer question but hopefully gave some Ideas that might get you there.
     
    Rick
  • WarrenBelz Profile Picture
    156,456 Most Valuable Professional on at
    Another option to consider - also can you please remember to post your code in Text - saves re-typing for everyone.
    With(
       _PatchID12;
       ForAll(
          colObservacionesPatch As Gal;
          Patch(
             ObservacionesArqCom;
             Defaults(ObservacionesArqCom);
             {
                Fecha: Gal.Fecha;
                Proyecto: Gal.Proyecto; 
                PersonaReporta: Gal.PersonaReporta; 
                Lugar: Gal.Zona;
                PartidaReportada: Gal.Partida; 
                Descripcion: Gal.Descripcion; 
                Estado: 
                If(
                   Gal.LevantaObs = "Si"; 
                   "Coipletado";
                   "Pendiente"
                );
                Ano: Year(Now();
                Codigo: Gal.Codigo;
                TipoObservacion: Gal.Tipo
             }
          )
       },
       ForAll(
          _PatchID12 As _ID12;
          FlowComercial.Run(
             _ID12.ID;
             CBConvoca_3.Selected.Listadeproyectos;
             TextCanvasl_47.Text;
             _ID12.Levantainiento;
             {
                file:
                {
                   contentBytes: _ID12.Imagen;
                   name: _ID12.Nombre
                }
             }
          )
       )
    )
     
    Please click Does this answer your question 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 a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn    Buy me a coffee

  • WarrenBelz Profile Picture
    156,456 Most Valuable Professional on at
    A quick follow-up to see if you received the answer you were looking for or if you need further assistance.

    Please click Does this answer your question 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 a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn   
  • Suggested answer
    CU13022108-0 Profile Picture
    18 on at
    @RW-30121623-0 thanks for your comments.
     
    I create a new column as a unique identifier to be able to join my library and list when saving several observations. To do this, I create a variable that obtains the last item created and adds one with form added a new observation.

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