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

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (55,870)