cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sidhant_02
Post Prodigy
Post Prodigy

Uploading Files to Document Library using PowerApps

Hi everyone,
I was working on a requirement wherein I had to upload files (file type can pdf,jpg, txt,etc and it can be more than 1) using Power Apps. So for that I created a Document library in my SharePoint site (named: DEMO_PowerApps) and the document library is named ('IZ'). In this Document library I have created few sub-folders like the following:

Sidhant_02_0-1696853284971.pngSidhant_02_1-1696853303384.pngSidhant_02_2-1696853333054.png

To upload files in the Document library I am using Power Automate Flow which is as follows:

Sidhant_02_3-1696853464122.png

So here basically I have created an Instant cloud flow and created a condition (which always evaluates to false) and have used the SendEmail activity in which I am defining the attachments (like name of File, Folder path, content) have used Dynamoic Expression : Ask in Power Apps (for the Yes Part) and then I am using the same defined parameters in Creating a SP file in the Document library.
Now one is issue is  when I am uploading the file in the Folders I am able to only see till Level-1 folders like in my Document Library (Intelizign) there are the following levels:
Main Level:
Folders: PLM, Software Services

(In Software Services: Mendix , Polarion). So currently the drop-down is only showing till Main level the other nested folders are not displayed and the second thing is there are duplicates:

Sidhant_02_4-1696853893570.png

So the flow is working fine (like I selected Intelizign/PLM) and uploaded a file pdf it gets uploaded properly in that file location.

Sidhant_02_5-1696853971691.png

So my final expectation is like this:

Sidhant_02_0-1696858198676.png

 

In the main drop down it will list all the folders at the very first level (here it will be PLM, Software services). Based on the selection made in drop down 1 (Suppose users selects PLM) then only the respective file or sub-folders should be shown (like in PLM there is only one sub-folder so it only show that folder in the second drop-down).
For Type: Drop down there will some choices that will be shown user can select one or more and that should be associated with all the attachments.

 

 

 


2. Associating Types with all the attachments
Now my upload screen looks:

Sidhant_02_7-1696854182888.png

I want to add another column in the document library named: Type which is a choice column (which will have certain choices) and the choices will be dependent based on the Destination choice selected.
Example:
Assume we have following choices: security, implementation, data-consume, certification, api.
So if user selects PLM then only show: implementation, data-consume, certification.
For Software Services: security, implementation, api.
And then after clicking on Upload the selection (type) should also get associated with the uploaded file, if user has uploaded 3 files and has chosen Type: security,implementation should get that value associated with it (multi-selection).

Do let me know on how to proceed further, hoping for some help for this topic.

Regards,
Sidhant.

20 REPLIES 20
BCBuizer
Multi Super User
Multi Super User

Hi @Sidhant_02 ,

 

Using cascading dropdowns is an excellent method to use in combination with what I suggested, but then it's easier to use Text type columns instead of Choce columns.

 

A way to managed the relations between the items in the dropdowns is to use a separate list. This will enable you to add further levels down the line as well:

 

CategoriesList

Level 1 Level 2 etc.
PLM implementation  
PLM data-consume  
PLM certification  
PLM api  
Software Services implementation  
Software Services data-consume  
Software Services certification  
etc. etc.  

 

The first dropdown's Item property should display all unique values in the Level 1 column:

Distinct(
   CategoriesList,
   'Level 1'
)

 The second dropdown should show all unique values in the level 2 column, filtered by the selected in dropdown1:

Distinct(
   Filter(
      CategoriesList,
      'Level 1' = DropDown1.Selected.Value
   ),
   'Level 2'
)

You can continue using the same pattern to add further levels.



Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

Hi @BCBuizer ,
Thanks for the response, to be more precise I was looking for something like this:

Sidhant_02_0-1697705360078.png

So as you can see if the first drop-down is selected then value is filtered -> Again if user wants to filter more data and select some value in 2nd drop-down (which is based on the drop-down 1 selection), similar to what we had done earlier in the uploading file part:

Sidhant_02_1-1697705670582.png

 

Like there will be the following drop-downs based on that filtering is done. 

Also have you created a separate list named CategoriesList which has 2 choice columns Level -1 and Level-2, I did not get how the Level-1 and Level-2 is related in a list.

Previously we did this:

Sidhant_02_2-1697706135855.png


Regards,
Sidhant.

Like the Document Library structure will be like this:

Sidhant_02_3-1697706630427.png

 

BCBuizer
Multi Super User
Multi Super User

Hi @Sidhant_02 ,

 

With this new solution, you can get rid of folders and all is saved in the root of the Intelizign list. New columns are are to be added to this list: 'Level 1', etc. that will have a value that corresponds with the options that are managed in the CategoryList. As mentioned in my previous post, it's easier to implement this using Text type columns.

 

This makes the Intelizign list look something like:

Intelizign

Name Level 1 Level 2 (Tags)
Capture11.png PLM Implementation
FilteUploadWithTags1.png PLM data-consume
pdf.pdf PLM  

 

The 'Level 1' (etc.) columns in the Intelizign list can then be used for filtering.



Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

Hi @BCBuizer ,
So as you suggested I have created a new list named CategoriesList with the two text columns named Level -1 and Level -2:

Sidhant_02_0-1697712828396.png

Then for testing purpose I have a created a new Document library named IZ, in which I am using the Lookup column that references the column values from the categories List but here the issue that I have seen there is repetation of the values 

Sidhant_02_1-1697713045248.png

Sidhant_02_2-1697713058052.png

But in Power Apps on using the expression that you suggested the duplicates are avoided

Sidhant_02_3-1697713111813.pngSidhant_02_4-1697713128282.png

And now once this is done how to filter the records and then also provide an option to view them in a new tab.
And to provide an option to add new files.

Regards,
Sidhant.

BCBuizer
Multi Super User
Multi Super User

Hi @Sidhant_02 ,

 

The issue you describe would be avoided if 'Level1' and 'Level2' columns in the IZ list were implemented as a Text type column, not a LookUp type. 

 

In any case you should encourage users to use the Power App instead of the SharePoint User Interface. If you want this to work as well in the SharePoint UI, perhaps you better ask the question in the SharePoint community: https://techcommunity.microsoft.com/t5/sharepoint/bd-p/SharePoint_General



Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

Okay, the thing is I was just using the SharePoint UI interface to create some test data and then most of the part was going to be done in Power Apps, so add the test data instead of creating the columns (single-line text) I decided to make use of the same values from the CategoryList
But I will ask about this in the SharePoint community as well.

Previously (for uploading files) to SharePoint Document Library based on Levels you had suggested some expression:

Sidhant_02_0-1697776272660.png

(For the main Level it works but there is repetition of values so I tried using Distinct but gives an error, so how to avoid this). Also for the level-1 (sub-folders inside on selection of the main level you had given the following expression, but it is displaying blank values)

Sidhant_02_1-1697776425960.png

Is there anything that I have missed. 

Regards,
Sidhant.

BCBuizer
Multi Super User
Multi Super User

Hi @Sidhant_02 ,

 

The whole point of using categories is to get rid of the use of folders so things can be made delegable. Please store all your files in the root of the library and use categories (Level1 etc.) for storing / retrieving files.



Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

Yes, I got your point that at a later stage Folders in the Document Library wont be delegable so it is better we upload all the files in the root level itself add some meta-data like Tags and Levels to differentiate it. 
Currently I have created a document library where I am storing in the root level have added the Leve-1 and Level-2, for the repetition on the SharePoint UI side, I will ask about this on the SharePoint community.
 

Sidhant_02_0-1697787316332.png

 

Hi @BCBuizer ,
Figured out the blank value being displayed it was due to the value by default was pointing to Compliance Id which I changed it to Name and got the values.
But now I was implementing the cascading drop down structure: 
Scenario: Main Level: India, Germany
(Folder: India) : Sub-Folder : Training , File1 Tag: security, File2  Tag: implementation [Training {Folder}: PPT <- filename]
(Folder:Germany): Sub-folders: Security, POC's
POC's : LoginPoc.docx   Tag: implementation
Security: Azure.docx   Tag: security

So based on the selection in the main drop-down all the files and folders should be displayed in the gallery and the level-1 drop-down will only be displayed if there are any sub-folders else it won't be shown.

So I created a collection On-start of the app which keeps all the folders in one collection and files in one collection:
ClearCollect(foldersCollection,Filter(TrialLibrary,IsFolder=true));
ClearCollect(filesCollection,Filter(TrialLibrary,IsFolder = false));

//Here: TrialLibrary is the name of the document library
So now to display the level-1 files and folders on the On-Change property of the level-0 drop-down I am trying to concatenate both the collections based on the selection made:

Sidhant_02_0-1698230991142.png

So I am not sure how to resolve this, is there anything wrong with this?.

Based on the collection I was going to use the same to decide whether the Level-1 dropdown should be shown or not (if there are any more sub-folders in the Level-0 selection)
like this: CountRows(SelectedFolderCollection) > 0


Helpful resources

Announcements

Tuesday Tip | How to Get Community Support

It's time for another Tuesday Tip, your weekly connection with the most insightful tips and tricks that empower both newcomers and veterans in the Power Platform Community! Every Tuesday, we bring you a curated selection of the finest advice, distilled from the resources and tools in the Community. Whether you’re a seasoned member or just getting started, Tuesday Tips are the perfect compass guiding you across the dynamic landscape of the Power Platform Community.       This Week: All About Community Support Whether you're a seasoned community veteran or just getting started, you may need a bit of help from time to time! If you need to share feedback with the Community Engagement team about the community or are looking for ways we can assist you with user groups, events, or something else, Community Support is the place to start.   Community Support is part of every one of our communities, accessible to all our community members.   Within each community's Community Support page, you'll find three distinct areas, each with a different focus to help you when you need support from us most. Power Apps: https://powerusers.microsoft.com/t5/Community-Support/ct-p/pa_community_support Power Automate: https://powerusers.microsoft.com/t5/Community-Support/ct-p/mpa_community_support Power Pages: https://powerusers.microsoft.com/t5/Community-Support/ct-p/mpp_community_support Copilot Studio: https://powerusers.microsoft.com/t5/Community-Support/ct-p/pva_community-support   Community Support Form If you need more assistance, you can reach out to the Community Team via the Community support form. Choose the type of support you require and fill in the form accordingly. We will respond to you promptly.    Thank you for being an active part of our community. Your contributions make a difference!   Best Regards, The Community Management Team

Community Roundup: A Look Back at Our Last 10 Tuesday Tips

As we continue to grow and learn together, it's important to reflect on the valuable insights we've shared. For today's #TuesdayTip, we're excited to take a moment to look back at the last 10 tips we've shared in case you missed any or want to revisit them. Thanks for your incredible support for this series--we're so glad it was able to help so many of you navigate your community experience!   Getting Started in the Community An overview of everything you need to know about navigating the community on one page!  Community Links: ○ Power Apps ○ Power Automate  ○ Power Pages  ○ Copilot Studio    Community Ranks and YOU Have you ever wondered how your fellow community members ascend the ranks within our community? We explain everything about ranks and how to achieve points so you can climb up in the rankings! Community Links: ○ Power Apps ○ Power Automate  ○ Power Pages  ○ Copilot Studio    Powering Up Your Community Profile Your Community User Profile is how the Community knows you--so it's essential that it works the way you need it to! From changing your username to updating contact information, this Knowledge Base Article is your best resource for powering up your profile. Community Links: ○ Power Apps ○ Power Automate  ○ Power Pages  ○ Copilot Studio    Community Blogs--A Great Place to Start There's so much you'll discover in the Community Blogs, and we hope you'll check them out today!  Community Links: ○ Power Apps ○ Power Automate  ○ Power Pages  ○ Copilot Studio    Unlocking Community Achievements and Earning Badges Across the Communities, you'll see badges on users profile that recognize and reward their engagement and contributions. Check out some details on Community badges--and find out more in the detailed link at the end of the article! Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio    Blogging in the Community Interested in blogging? Everything you need to know on writing blogs in our four communities! Get started blogging across the Power Platform communities today! Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio   Subscriptions & Notifications We don't want you to miss a thing in the community! Read all about how to subscribe to sections of our forums and how to setup your notifications! Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio   Getting Started with Private Messages & Macros Do you want to enhance your communication in the Community and streamline your interactions? One of the best ways to do this is to ensure you are using Private Messaging--and the ever-handy macros that are available to you as a Community member! Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio   Community User Groups Learn everything about being part of, starting, or leading a User Group in the Power Platform Community. Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio   Update Your Community Profile Today! Keep your community profile up to date which is essential for staying connected and engaged with the community. Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio   Thank you for being an integral part of our journey.   Here's to many more Tuesday Tips as we pave the way for a brighter, more connected future! As always, watch the News & Announcements for the next set of tips, coming soon!

Hear what's next for the Power Up Program

Hear from Principal Program Manager, Dimpi Gandhi, to discover the latest enhancements to the Microsoft #PowerUpProgram, including a new accelerated video-based curriculum crafted with the expertise of Microsoft MVPs, Rory Neary and Charlie Phipps-Bennett. If you’d like to hear what’s coming next, click the link below to sign up today! https://aka.ms/PowerUp  

Tuesday Tip: Community User Groups

It's time for another TUESDAY TIPS, your weekly connection with the most insightful tips and tricks that empower both newcomers and veterans in the Power Platform Community! Every Tuesday, we bring you a curated selection of the finest advice, distilled from the resources and tools in the Community. Whether you’re a seasoned member or just getting started, Tuesday Tips are the perfect compass guiding you across the dynamic landscape of the Power Platform Community.   As our community family expands each week, we revisit our essential tools, tips, and tricks to ensure you’re well-versed in the community’s pulse. Keep an eye on the News & Announcements for your weekly Tuesday Tips—you never know what you may learn!   Today's Tip: Community User Groups and YOU Being part of, starting, or leading a User Group can have many great benefits for our community members who want to learn, share, and connect with others who are interested in the Microsoft Power Platform and the low-code revolution.   When you are part of a User Group, you discover amazing connections, learn incredible things, and build your skills. Some User Groups work in the virtual space, but many meet in physical locations, meaning you have several options when it comes to building community with people who are learning and growing together!   Some of the benefits of our Community User Groups are: Network with like-minded peers and product experts, and get in front of potential employers and clients.Learn from industry experts and influencers and make your own solutions more successful.Access exclusive community space, resources, tools, and support from Microsoft.Collaborate on projects, share best practices, and empower each other. These are just a few of the reasons why our community members love their User Groups. Don't wait. Get involved with (or maybe even start) a User Group today--just follow the tips below to get started.For current or new User Group leaders, all the information you need is here: User Group Leader Get Started GuideOnce you've kicked off your User Group, find the resources you need:  Community User Group ExperienceHave questions about our Community User Groups? Let us know! We are here to help you!

Super User of the Month | Ahmed Salih

We're thrilled to announce that Ahmed Salih is our Super User of the Month for April 2024. Ahmed has been one of our most active Super Users this year--in fact, he kicked off the year in our Community with this great video reminder of why being a Super User has been so important to him!   Ahmed is the Senior Power Platform Architect at Saint Jude's Children's Research Hospital in Memphis. He's been a Super User for two seasons and is also a Microsoft MVP! He's celebrating his 3rd year being active in the Community--and he's received more than 500 kudos while authoring nearly 300 solutions. Ahmed's contributions to the Super User in Training program has been invaluable, with his most recent session with SUIT highlighting an incredible amount of best practices and tips that have helped him achieve his success.   Ahmed's infectious enthusiasm and boundless energy are a key reason why so many Community members appreciate how he brings his personality--and expertise--to every interaction. With all the solutions he provides, his willingness to help the Community learn more about Power Platform, and his sheer joy in life, we are pleased to celebrate Ahmed and all his contributions! You can find him in the Community and on LinkedIn. Congratulations, Ahmed--thank you for being a SUPER user!  

Tuesday Tip: Getting Started with Private Messages & Macros

Welcome to TUESDAY TIPS, your weekly connection with the most insightful tips and tricks that empower both newcomers and veterans in the Power Platform Community! Every Tuesday, we bring you a curated selection of the finest advice, distilled from the resources and tools in the Community. Whether you’re a seasoned member or just getting started, Tuesday Tips are the perfect compass guiding you across the dynamic landscape of the Power Platform Community.   As our community family expands each week, we revisit our essential tools, tips, and tricks to ensure you’re well-versed in the community’s pulse. Keep an eye on the News & Announcements for your weekly Tuesday Tips—you never know what you may learn!   This Week's Tip: Private Messaging & Macros in Power Apps Community   Do you want to enhance your communication in the Community and streamline your interactions? One of the best ways to do this is to ensure you are using Private Messaging--and the ever-handy macros that are available to you as a Community member!   Our Knowledge Base article about private messaging and macros is the best place to find out more. Check it out today and discover some key tips and tricks when it comes to messages and macros:   Private Messaging: Learn how to enable private messages in your community profile and ensure you’re connected with other community membersMacros Explained: Discover the convenience of macros—prewritten text snippets that save time when posting in forums or sending private messagesCreating Macros: Follow simple steps to create your own macros for efficient communication within the Power Apps CommunityUsage Guide: Understand how to apply macros in posts and private messages, enhancing your interaction with the Community For detailed instructions and more information, visit the full page in your community today:Power Apps: Enabling Private Messaging & How to Use Macros (Power Apps)Power Automate: Enabling Private Messaging & How to Use Macros (Power Automate)  Copilot Studio: Enabling Private Messaging &How to Use Macros (Copilot Studio) Power Pages: Enabling Private Messaging & How to Use Macros (Power Pages)

Top Solution Authors
Top Kudoed Authors
Users online (3,442)