cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper IV
Helper IV

Adding specific attachment(s) to SharePoint list via PowerApps

Hi All,

 

I have a SharePoint list with attachments enabled and the input form is associated to a power app. 

I like to give my users the ability to add 2 separate attachments in such a way that other field settings determine which one (or both) they should upload... but I'm only able to create a single input field where they can add as many as they like, but that does not enable me to a) guide their behavior and b) for me to check if the correct attachment(s) have been attached....

 

Does anybody have an idea on how to achieve this?

 

Any feedback is really appreciated!

 

Regards

Charles

 

6 REPLIES 6
Highlighted
Super User
Super User

Re: Adding specific attachment(s) to SharePoint list via PowerApps

Hi @Charles-v-D ,

You could do something on the OnAddFile of the control - for example if you only wanted pictures (jpg), you could do this 

If(
    Right(
        Last(Self.Attachments).Name,
        3
    ) <> "jpg",
    Notify("Only Pictures allowed",Error),
    Reset(Self)
)

so you could add your logic according to the settings. You can also set MaxAttachments and MaxAttachmentSize on the control.

If you could elaborate on exactly what you are trying to do, I am happy to help further.

 

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.

Highlighted
Helper IV
Helper IV

Re: Adding specific attachment(s) to SharePoint list via PowerApps

@WarrenBelz 

Hi Warren, thank you for reaching out. I realize I might have no spelled out correctly what I'm trying to achieve... so as a picture says more then a thousand words.... here we go:

 

Current situation: screenshot of the SharePoint list input screen based on PowerApp. Single location to add all attachments.. hence no control on what is mandatory and what is requested. No control on determining afterwards what was uploaded..

q1.JPG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

What I'm trying to achieve: individual input fields for attachment so that I can control which ones are mandatory, which optional and what goes where... this is just a mock-up... :

q2.JPG

 

Hope this clarifies my ask 🙂

 

Thanks for your ongoing support!

 

Regards

Charles

 

Highlighted
Super User
Super User

Re: Adding specific attachment(s) to SharePoint list via PowerApps

Thanks @Charles-v-D ,

You can only have one attachment control per form. You can technically add another one if you unlock the first, but they will both show the same content all of the time and are actually only copies (so pointless).

You did not say how you wanted to control the attachments and to what extent. I gave the example of the file type, which can be conditional on other controls if necessary, 

As I mentioned in my example, you can reference the last uploaded (current one chosen) but the only information you have is really the name and size. As mentioned above however you cannot have two controls - there is only one set of attachments per record.

 

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.

Highlighted
Helper IV
Helper IV

Re: Adding specific attachment(s) to SharePoint list via PowerApps

Hi @WarrenBelz 

 

You have confirmed my fear 😟

 

If we forget my approach, do you think there is a way to solve this, like linking input in the list to the objects in a SharePoint library?... just thinking out loud.....

 

Regards

Charles

 

Highlighted
Super User
Super User

Re: Adding specific attachment(s) to SharePoint list via PowerApps

Hi @Charles-v-D ,

I am still not clear exactly what you want to control on the attachments? Number of them, file type, name, size and on what criteria?

Highlighted
Super User
Super User

Re: Adding specific attachment(s) to SharePoint list via PowerApps

Hi @Charles-v-D ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

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.

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,084)