cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Antooooox
Regular Visitor

PowerApps form - Add attachments to specific folder in library

Hi everyone, I have a question

 

I have created an PowerApp that should enable people to save attachments to specific folders in the library, I have connected the form to the library and all the folder can be seen in the dropdown, but how do I enable to the attachments actually get stored in the chosed folder?

 

Thanks 🙂

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @Antooooox :

Do you want to save the file directly to the specified path in the corresponding library through the Attachments control?

As far as I know, there is currently no way to save the attachment as a file in the library directly through the form control. My suggestion is to use a combination of Power App and Flow to fulfill this requirement.I've made a test for your reference:

1\My Library

1.JPG

2\Create a SharePoint List

2.JPG

3\Back to the Power Apps studio and create a form(Form6)

DefaultMode

FormMode.New

DataSource

AddFiles

Only keep the attached data card

4\Add a combo box control(ChoseFolder)

Items

Filter(picc,IsFolder)

 DisplayFields

["{Name}"]

5\Add a button

OnSelect

Patch(
    AddFiles,
    Defaults(AddFiles),
    {
        Title: Text(
            Now(),
            "[$-en]yyyy/mm/dd hh:mm:ss"
        ),
        Path: "/" & ChoseFolder.Selected.'Full Path'
    },
    Form6.Updates
)

 6\Create a flow

3.JPG

7\The Result

4.JPG5.JPG

Best Regards,

Bof

View solution in original post

1 REPLY 1
v-bofeng-msft
Community Support
Community Support

Hi @Antooooox :

Do you want to save the file directly to the specified path in the corresponding library through the Attachments control?

As far as I know, there is currently no way to save the attachment as a file in the library directly through the form control. My suggestion is to use a combination of Power App and Flow to fulfill this requirement.I've made a test for your reference:

1\My Library

1.JPG

2\Create a SharePoint List

2.JPG

3\Back to the Power Apps studio and create a form(Form6)

DefaultMode

FormMode.New

DataSource

AddFiles

Only keep the attached data card

4\Add a combo box control(ChoseFolder)

Items

Filter(picc,IsFolder)

 DisplayFields

["{Name}"]

5\Add a button

OnSelect

Patch(
    AddFiles,
    Defaults(AddFiles),
    {
        Title: Text(
            Now(),
            "[$-en]yyyy/mm/dd hh:mm:ss"
        ),
        Path: "/" & ChoseFolder.Selected.'Full Path'
    },
    Form6.Updates
)

 6\Create a flow

3.JPG

7\The Result

4.JPG5.JPG

Best Regards,

Bof

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,433)