web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Two attachment fields
Power Apps
Answered

Two attachment fields

(0) ShareShare
ReportReport
Posted on by 1,121

I am looking to have two attachment fields but I know you can only have one attachment column per SharePoint list.

If I created an other List just for the second attachment can I call that from the same power app as the first attachment field?

 

J

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @jbrines 

    Yes, you could do this.  You would need some references between the two lists so that you know the attachments in the second list are related to the first.  And you will need to do some tricky submitting for the attachments as you need to utilize the Attachment control.

     

    I would recommend though that you consider using a document library for this as you will have more flexibility for that time when you say "can I have three?"

     

    I hope this is helpful for you.

  • jbrines Profile Picture
    1,121 on at

    @RandyHayes 

     

    Is it just a matter of creating the document library and pointing the App to it, then adding your field. I want the user of the app to be able to see the attachments from the app just the attachment field does in the list?

     

    J

  • Verified answer
    RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @jbrines 

    If you move to a document library the design is a little different.  Yes, you can connect to the library just fine in PowerApps.  However, the simplicity of the Attachment control kind of goes out the window as you are not working with the attachments any longer, you are working with real documents.  There are a variety of ways to go about getting the documents into the library from the App and there are numerous videos and forum posts on doing that.  

     

    NOW, depending on your data design, you can either continue to have one list that has the information you need in it (and this is probably recommended as you seem to indicate that you will have one to many records in the library) or put the metadata directly into the library (libraries are really just lists in SharePoint as well).

     

    I would say that if you keep two lists (list and library), at least have a column in the library that will contain the ID (or some other unique aspect of the master record) in it.  Then in your App, you simply filter the document library by that unique column. 

     

     

  • jbrines Profile Picture
    1,121 on at

    @RandyHayes 

     

    I will explain what I am doing with the List I have created.

     

    The list is to allow Clients to log issues with the job we have done for them. Once logged it is assigned to one of our managers to will then assign it to a contractor for them to fix.

     

    The client adds the details as well as pictures on the app. We only want the client to see their pictures they have uploaded. We are happy for the contractor to see the client pictures. We don't want the client to see any pictures t the contractor uploads. We also don't want the contractor to see any other contractor or client has uploaded uploads.

     

    Right now I have three apps.

    1. Client App
    2. Manager App (happy for them to see all pictures)
    3. Contractor.

     

    Hope it makes sense.

     

    J

  • Verified answer
    RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @jbrines 

    Yes, based on that description, I would then highly recommend the document library as you will have very little control over the attachments.  Attachments are just a list of files in a record.  There is nothing else associated with them.

    With a document library you can have additional columns in it to specify the client, the job, the submitter and so forth and can then use this to filter in all of your apps.

  • jbrines Profile Picture
    1,121 on at

    @RandyHayes 

     

    Any hints/tips on how to set it up?

     

    J

  • Verified answer
    RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @jbrines 

    Well, just brainstorming a little - I'd say you would have a document library with the following columns:

        Project - some identification of the project (Number or Text)

        Submitter - a text column that would either end up with "Client" or "Manager" or "Contractor"

        Client - a text column that would identify the Client (or a numeric column that would contain the ID of a client record)

     

    Then 

    1. Client App
      Ultimately when showing the documents to the client, a filter on the gallery of items would be:
      Filter(docLib, Client=clientIdentification && Project=projectIdentification && Submitter = "Client")
    2. Manager App (happy for them to see all pictures)
      Same logic as above, but with less of a filter:
      Filter(docLib, Client=clientIdentification && Project=projectIdentification)
    3. Contractor.
      Again, same logic:
      Filter(docLib, Client=clientIdentification && Project=projectIdentification)

     

     

  • jbrines Profile Picture
    1,121 on at

    @RandyHayes 

     

    Will they be able to take pictures on the app like they do using the list attachment?

     

    J

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @jbrines 

    Yes, you would just use the Add Picture control instead.

    This article has a pretty good outline of it...there are many more articles like this.

  • jbrines Profile Picture
    1,121 on at

    @RandyHayes 

     

    Sorry if this is a stupid question but let say in the client app how does the doc library know that it is the same client that that has created the attachment? Trying to understand the relationships between the list and the Doc Library.

     

    J

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard