Reza - you are a genius! Whenever I am trying to do something in Power Apps, I always come back to you. With this video you get a file into Sharepoint (with no Flow). By using the code you made to get files to show in the pdfviewer (another excellent video) and putting that code into the Record.Value here, you can now backup a file to pdf in another library - I have used it as part of a document control to supersede the old version as a pdf
Thanks so much Brian. I always think why dont folks mix concepts from 2-3 video and here you are. So happy to hear that you have built a solution using multiple videos.
OMG... you're a GENIUS!!! I've been trying to get my app to upload file attachments for the last 3 weeks using power automate. This worked first try! THANK YOU!!!!!
Reza, I wanted to say that I got a job as a PowerPlatform Developer, and it's mainly because of you, because from your videos I've learnt so much. I will be forever grateful
Amazing Reza, I wish we can have another channel on Python from you. I know its too much to ask but your content delivery has been soo simple and straight forward to the community.
Thanks for the clear explanation Reza! HTTPRequest seems a very powerful method, but how do we know what permissions it has (like the ones you say it has at 8:30 ?) Is it any graph permission that doesn't show as "Admin Consent Required" on the Graph Explorer? Also given that there is now a HttpRequestV2 method which only has access to the groups segment, do you think Microsoft will deprecate the "V1" functionality?
I do not have the list of permissions (not documented). Im not sure about deprecation. Typically when a new version comes out, its recommended to use the latest one.
Michal and Reza, I am getting a null array when I try and use the http request to get the library IDs. Are you saying you have to have the Document ID service turned on in order to get a return list of the library IDs or is this possibly a permission issue? Is there any other way to get to the library ids?
Thank you Reza. Your videos area really amazing!!. Great job!! Even, in the site, there are some lists and libreries, when I make the query, value is empty [ ]
This is great. Once the doc is uploaded, this app allows you to edit/update doc metadata, but what if you wanted to re-upload a replacement document as part of the document update process (without interacting with the SharePoint doclib directly)? That would be handy if it could all be done within the app.
Hey Reza this is awesome! Question on the Refresh() operation vs. the varReset variable and their differences/expenses on performance: how does the varRefresh consume less resources than Refresh() operation? Aren't both performing a lookup against the data source either way or am I missing something? If you could do a video on how to best leverage updating/refreshing collections after making record updates that write to SharePoint that'd be much appreciated! For example: I set a collection using a Filter() on a data source. I then create/modify an existing record via a form, but using data from the collection initially (maybe I set varFormRecord to ThisItem from a gallery that feeds from the collection). Now that the data has changed (we updated SharePoint from an Edit Form), what is the best performance-wise way to update the local collection without doing a ClearCollect() operation again? Is this possible?
The Refresh function retrieves a fresh copy of a data source learn.microsoft.com/en-us/power-platform/power-fx/reference/function-refresh The varReset technique simply re-triggers the Filter condition which in turns performs a delegable (server-side) query to get items. A lot is cached in power apps for performance reasons. I recommend connecting galleries to data source and preferably not load all data or filtered data in collections. Collections are stored locally in power app for user session. If you need static data, then collections makes sense. For data on which CRUD is being performed in apps, direct connection is a better option.
Awesome as usual, Reza! I run into an issue I managed to solve this way: When quering drives, it won't return any data unless modify permission right there in the "Modify permissions" tab, and concent Sites.Read.All, Files.ReadWrite, Files.ReadWrite.All, Sites.ReadWrite.All in my logged in session from Graph Api Explorer (all delegated permissions so no admin concent requested as Reza states :) ). Cheers!
Thanks Reza, you know I've been waiting for this 😁 What great idea on his documents are uploaded, I guess the only Downside is the file limitation. Have you tried it with larger files? Are you aware if this limit is likely to increase at all? Also is that resetting the gallery by a variable reduces the impact then I'll look into putting that into my Apps in future - Might need to do a few tests tho. Thanks again, keep up the great work 👌
at 10:11 I struggled with enumerate the document libraries under the root site (Graph Explorer). Realized that I need to consent to permission under "Modify permissions" tab.
Hey Reza, GREAT video. Do you have an example of uploading a document to a folder that doesn't exist yet with GraphAPI? I know we can do it with PowerAutomate but was just curious.
Reza great video. I got it working but am struggling on uploading the files to a folder in the document library. What is the syntax for that?? Thank you.
Hi Reza, Thanks for the great video, I was wondering if we can use the same connector for creating a folder ( POST /sites/{site-id}/drive/items/{parent-item-id}/children)
Reza this is an amazing video! I found it extremely helpful and it works flawlessly. I have one issue that I am running into. I want to sort by name in alphabetical order. However, the name column in SharePoint when used to sort gives a Delegation warning. But the Title column does not. Do you know of a way when uploading using the GraphAPI to set the Title column in SharePoint to the Attachment Name?
Thanks! You cannot set metadata using file upload action. Even in SharePoint, one has to first upload file and then set its properties. You would need to first upload file and then use patch function to update its properties. I do not have a specific video on this though.
@@RezaDorrani Thank you for the speedy reply! If you do create a video that would be awesome. I tried using the Patch in graphAPI and couldn't get it to work. For now even though I didn't want to use Power Automate I just created a simple flow and sais when a file is created update the title column.
@@drscott212 I make videos when I receive multiple requests on a topic. Every quarter I ask subscribers for topic suggestions on Community Tab of my channel. Most voted idea gets added to my backlog. Make sure to post this idea whenever I post the next topic suggestion post.
Great video!!! It saves extra work of creating a power automate flow. Could you please let me know if is it possible to check if a folder exists and if folder does not exists then first creating a folder then uploading the files inside it
I learn something new, thanks for the tutorial as always. Supposed I uploaded 2 files, I need to update a column dynamically based on the selected ID from the gallery. Is there an easy method to update the metadata?
First a file has to be uploaded. Metadata can be set after file upload is complete. You can use patch function or form control or graph api to update metadata.
You would need to get context of item(file) created and then update metadata as a separate request. You cannot upload and update metadata with same api call.
@@RezaDorrani I have had the opportunity to implement this concept in my project, and it works fine. However, when it comes to the Desktop player, Upload action is not working. Do you have any ideas or suggestions on how to resolve this issue?
No, since the API only supports uploading files (This is also what happens in a doc lib. You first upload a file and then set metadata). Once file is uploaded, you would need to get context of item and then fire another query to update the metadata.
Hi @reza, your content is always helpful. I have a question here related to this video In this video, we saw that we can upload a file in any Sharepoint document library. Can we make this process completely dynamically? This means you will get an option of different SharePoint sites - document library in a drop-down where they want to upload? and File viewer for different SharePoint sites in the Power app.
Possible but you would somehow need the list of site ids and drive ids where files are being uploaded. However, to showcase data, you would need to connect to each of those data sources.
Hello reza Thanks for sharing your videos, tutorials, and the valuable information you've provided. I have a question, I have a requirement to use sharepoint library to store files through power apps the files have a large size so can I open a link directly from power apps to the library and allow user to upload his files? Is there any points to take into consideration when doing that? Thank you again
I have not built any scenario with linking over to SP so not sure about considerations. 1 thing for sure though - you will need to provide a refresh feature in app to load the latest files.
Thank you so much Reza! Very helpful walk through as usual, and also to learn about the HttpRequest method on the Office365Groups connector - lots of interesting possibilities via the MS Graph API.
Thanks Reza! Top tier content always. Question: I assume this would work with Azure blob storage, correct? And, if so, would that be more efficient and scalable?
This was even better method for uploading files than with flow. And i was able to get it work this time 🙂 But i like to use dynamic variable for upload to target folder, instead of root. I manage to insert variable between http-request, but this make only whole path folders to root.
Thanks. This is useful as we can now remove our power automate flows and use the direct connectors. We have struggled with power automate flows when we move our app and associated flows from one environment to another using solutions. The connection between the app and the flows always get disconnected when we move to higher environment as managed solution. We then have to edit the managed app and individually hit refresh on each of the associated flows. We also have flows that set permission on the list items in sharepoint online. Unfortunately, we have not found Graph API calls to update list item level permissions.
There are known challenges with flows with solutions that are connected to an App. All of them are well documented and hopefully the experience would be seamless in future. I have not explored all of the graph endpoints hence not sure if it has the permission apis for SharePoint.
Great stuff! Can’t wait to try this out. I’m curious Is it possible to send values for columns in my document library? E.g. I have 3 text and three choice columns regarding the document that I want to „patch“ when uploading via graph api. Can I do this with the graph API call as well with parameters or something like that?
You cannot do that on upload of file. Can be done after file is uploaded however, we can straight out leverage the form control for that as shown in video.
Okay. So giving my user the opportunity to for example assign the document to a project and status in powerapps via Dropdowns and sending his selection via graph api to the document library is not possible?
Sick! That's very nice stuff Reza. Do I still need to add logic for duplicate files that are uploaded again in the SP doc library? Also, is it possible to add other metadata to the file via the graph api?
Thanks! You can always use the Lookup function to check if file already exists prior to executing the graph api call. Currently, if file is uploaded with same name, it will override the existing file (same as what SharePoint does). Video shows how to update the metadata via Power Apps. When uploading file, one cannot set metadata (similar to SharePoint behavior). Once uploaded metadata can be set via form control in Power Apps (As shown in video).
@Reza Dorrani I see, thank you for your answer. I skipped through the first part at first but looking back at it I see how you change the metadata after the file upload. Amazing Reza!
Thanks Reza, perhaps this solution will fix another problem I have when using Power Automate. When I upload a document in Power Automate "Copy file" from 1 library to another with the "replace" option we lose the previous versions of that document.
Hi, Reza I have a scenario like iam sharing a url through power automate flow by send email(v2) action. That link will expire after 21 days is there any idea about this Reza please help me
Thanks Reza, Great video. Only question I have here is it will not upload files larger than 50MB. Can you guide me any solution for larger files. Thank you
There is a graph api endpoint to upload large files as well (Upload large session - resuamble file). The resumable upload technique first requires a POST method to get the upload session link. Power Apps does not interpret the response as power apps is not aware of the response schema (will always return boolean true). So, we would have to call flow to interpret the response and get the URL to upload the file in byte sized chunks. This would be a complex process and better off to use flow to load the files. Important to note that power apps are designed keeping the mobile experience in mind. Uploading large files is not going to performant as all the work will be performed on the mobile device (performance + bandwidth challenges).
@@RezaDorrani What is the max file size we can upload it to Sharepoint (through power automate or graph api). In DV it's around 128 Mb (i have increased max file attachment size upto 128MB in environment advance settings) but i don't know that will support for Sharepoint also Could you help me on that??
@@muthusamythangavel3985 Dataverse file size has nothing to do with SharePoint. The graph api has a limit and I have that mentioned in video. I will recommend checking on forums in case someone has a workaround powerusers.microsoft.com/
Incredible tutorial! I successfully made my power app using your video. One question, instead of uploading all files to root, is there a way to upload to a specific folder? I have 2 screens. 1st screen, has user input their information with a Next button; Next button when clicked will create a folder in the document library based on the user's name and go to second screen. 2nd screen will allow multiple file uploads, but uploads to root. how can i specify the newly created folder for the files to upload to? Thanks!!
This is a really good new thing I learned today. I can see this approach supports a file size of 4 MB only. What is the approach to uploading large files in the SharePoint library without using Power Automate?
@@RezaDorrani You mean we need to use Power Automate to handle the actual upload of file chunks using SharePoint REST API? Automate would use HTTP requests to SharePoint to upload chunks of the file?
@@dhananjaykharade2711 Chunking will be super complex. Power Apps is not designed for uploading large files. Max I would say 20 MB per file. Beyond that you will see performance degradation.
@@dhananjaykharade2711 I don't know the file size limit for power automate. It's about what's max file size power apps can handle as the file will be uploaded in apps.
Hi Reza, love your videos! Wanted to ask you if you have ever tried to create a folder directly from PowerApps also? I tried it with graph API, but powerapps asks for the body of the request to be provided in binary format, and I do not know how to transform the JSON to binary.
Hi Reza. This was a very good and instructional video. I am new to PowerApps, but I have spent two days on your video, and now I got everything to work except the varCurrentPath. I want to save the files in a subfolder. I am on Sharepoint with Norwegian language, and I cant get it to work with "Shared documents/". Can you explain how I can find the root name of my Document library, and also the syntax of varCurrentPath
I do not have a specific video on this scenario. I had done it as part of one of the demos. In fact I did a video recently where I showed a full document library experience. I shared the entire code base (Member only). Link is in that videos description. Here is that video -> ua-cam.com/video/JxPznTUsaiQ/v-deo.html
Hello Reza, great video tutorial! Was able to achieve as per your tuto. One additional question: is it possible to upload in subfolder of root, but dynamic using item title as reference? As I already created subfolder with title as folder name? Thank you for your input. Jack
@@RezaDorrani Hello Reza, indeed, you mentioned it is possible, with created folders. But any possibility to refer to dynamic field such as item title?your hint is appreciated. Best.
@@RezaDorrani Reza, thank you very much for the hint! I'll look into it with concatenate function. I see it now! Great. Thanks again. Please keep your fabulous videos. Jean
Hi Reza, great video again. thanks for this. I want to know how can we make the Graph api endpoint dynamic. Basically the document library id, is there a way it can be made dynamic?
You could call graph api to get libraries, list it in dropdown. User can select and based on the selection pass that document id. That would be one way.
Reza, why has Microsoft not included an attachment control in the group of controls under Insert? Seems that this would have been in the first version of Power Apps to me.
Hi Reza, as always, very interesting solutions. One question I do normally use patch to save my records to SharePoint list, is it possible to add this solutions at end of my patch and the attachment will save on same record just patched? 🙏
This video is related to document libraries. You are trying to attach items to SharePoint lists. I have done multiple (4+) videos on uploading files to list item attachments. Check my playlist on list item attachments.
This has been an excellent tutorial. I had this working flawlessly.. but all of the sudden, I have no filename in between root:/ and /content on the output.. I wonder if they changed something
I have not come across the mentioned issue and hence not sure what the fix for your issue is. I recommend posting your issue with screenshots on the forums at powerusers.microsoft.com
Thanks reza, I had seen this method once or twice before. It's ust that 4mb limit is just a show stopper for me. If you have to worry about the file size uploaded. If there is a way to send that in chunks then that would be something.
Thanks Phil! There is a graph api endpoint to upload large files as well (Upload large session - resuamble file). The resumable upload technique first requires a POST method to get the upload session link. Power Apps does not interpret the response as power apps is not aware of the response schema (will always return boolean true). So, we would have to call flow to interpret the response and get the URL to upload the file in byte sized chunks. This would be a complex process and better off to use flow to load the files. Important to note that power apps are designed keeping the mobile experience in mind. Uploading large files is not going to performant as all the work will be performed on the mobile device (performance + bandwidth challenges).
@@RezaDorrani we just have scenarios where people would input data and provide documents / images as evidence. A lot of times people are out in areas where mobile connectivity is the only option. They end up emailing documents or worse third party doc storage which breaks the process. I see it as a graph limitation as opposed to Powerapps. A little increase to 10mb would cover a lot. Always grateful for you content Reza it explains ways of doing common things that business apps need to do but are not always straight forward to achieve.
As always thank you so much, just a problem... Can't find a way to list id of libraries of a subsite, the id of the subsite is the same as the parent and when I run the query to list the drives they won't appear :(
Hi Reza, thank you, again, for your videos!! Many people would be lost without you. I believe I have to consent for permissions to see the drive id, because my query gives me an empty value as a result. Am I correct? Which permission should I consent to to being able to see the id of my library?
I am also experiencing a similar issue. I logged into the Microsoft Graph using the same user account that is the owner of the SharePoint site and has full control over the document library. However, I am still receiving empty results when trying to retrieve the drive ID. The document library does not have broken permissions, and the site ID should be correct (I also tried obtaining the site ID using PnP, and it was the same). Does anyone have any suggestions on what could be causing this issue?
Thank you Reza for this tutorial. What could be the problem? I am stuck in the enumerating of document libraries as it shows an empty date on value. I tried with different sharepoint sites and I the site ID is correct. Hope you can address my issue. Once again, thank you.
I think someone did run into a similar issue and may have mentioned the fix. It requires some service running on site. You would need to look through the comments.
Hi Reza, this is very nice and elegant solution however would it be possible to tag each file before we upload to sharepoint? We are working with drawings and each have a unique number. Currently I have parse json in power automate and form control in power apps. Could we tag this attchments before we upload them to sharepoint with graph api? Many thanks Norbert
@@RezaDorrani I’ve been trying to use the graph api http request examples, but the file/body parameter appears to only accept binaries, not a json record
Hi, @rezadorrani. Excellent content, as always. How do you set document library properties or column values using this method for document uploading? Also is there any way around the MB limit? Or could you get the list ID or document ID as a return value?
You cannot upload and set properties for doc library. First one has to upload the document and later can set properties. There is no workaround the MB limit for this api.
Reza, great work!! Now I just have to figure out how to copy files. I’m trying to make it so users don’t have to manually upload the same file again when the second “project” is referring to that project. One of my biggest problems I have though is when a user download a file via a link using download and not launch, edge may respect it and download it and chrome may still launch it. I don’t want the user to overwrite the original file and when it launches, it allows them to edit it. They could “save as” on their computer, but that will be forgotten by many users. Is there anyway that I can make it so that they can’t edit the original file by forcing it to download and not allow it to launch❓ Also, with downloading, they don’t easily see the actual file location either.
Thanks Ray. Your scenario is not something I have come across or tried out. So not sure what the possibilities are. Reality is user will need access to SharePoint and nothing stops a user from taking these actions in SharePoint- uploading file with same name which would override.
@RezaDorrani do you have a video for a multi-level document approval process where the 2 levels of approvers change with each document? Selecting a manager from Office 365 doesn't work for me since the approvers aren't managers or in specific departments Thank you
@@RezaDorrani thanks for responding so quickly. I'll keep looking. My problem is getting the flow to send the email to a chosen recipient by I keep getting errors
Thanks Reza good thing somehow helps, Q: Can the user upload/create folder instead of single docs? IF yes , Is there size limit? IF not So , the only option is that they need to upload folders in the backend (doc-library)? I know It's a bit complicated as doc is involved, wish MSFT make a direct connection like list to manipulate the backend 😣pls MS do something, For my previous req The closest soln i found was from Andrew Hess , which meets my metadata gathering req with the doc, even that's more applicable only for single doc plus small size 10MG aint' doable. Now my req includes folder structure I mean not only display but also to create. Literally we wanted to mimic the whole doc library features in PowerApps so users don't need to access the backend. I think for now i better stick to the doc library not pull everything in PowerApps so i don't have worry about metadata /folder creation /size blalala ...
Folder upload - No Small file sizes are the challenge with most of the approaches including the one I have showcased in emails. Power Apps is designed keeping mobile experience in mind - large file sizes is a definite challenge on mobile devices. There are APIs in graph to create folders and then add files in folders but all of them will have size limits.
@@RezaDorrani Thank you Reza for the speedy response. That's all I wanted to confirm before investing anything in it . Have a beautiful and blessed 2023 .
Hi Reza, as always, very interisting video. One question : you use the Attached file datacard from a form control. Is it possible to do the same logic with a Import Control (already included in PowerApp) instead of creating a form and deleting it after you copied the attachment control ? Kind regards
Hi Reza, When I needed it most, this video saved the day. I appreciate your thorough explanation, which made the learning process go smoothly. On the basis of best practices and an effective screen run, I have a question for you. I must save my submitted files in a document library and I have five upload controls on one screen linked to a SharePoint list. All that is left for me to do at this point is to push all of the uploaded files to the library after the form has been submitted (in separate 5 fns because the controls are different). Is it advisable to include everything in the Submit button's OnSelect property? What are your recommendations?
You can submit them on click of single button one after the other. Big challenge is that the response is a problem as you would not know if it succeeded or not. My next video will show something new which would help in evaluating the response.
@@RezaDorrani Thanks for the response. I look forward as always for your next video. I tried to upload file and ended up in a run time error. How can we identify the reason behind response error?
Thanks for this approach - it is a great alternative to using Flow. Is it possible to also populate the file(s) and their metadata all in the same Graph call? In other words create the file and populate all of the metadata.
Appreciate for taking your time writing your feedback. But will this solve as well of disabling the auto compress in Power Apps when uploading an image file?
Hi, Reza as always, your video was just what I was looking for!! I just face one issue: I can not seem to find a way to rename the file in the attachememt control. I want to avoid using a flow to do this, and the method you used for tagging lists attachements does not work for libraries [ClearCollect(Defaults(datasource).Attachements)]. The reason I need to rename the files, I.e. make them unique is because if there is a file with the same name, it will be overwritten without any notification if I use the Graph API. Is there a way to fix this? Would really appreciate some help since I could not find a solution online!
This video is about uploading files to document library and not list item attachments. I have done other videos on list item attachments and renaming them. You can check those.
@Reza Dorrani Yes, but you are using an attachment control to upload to a sharepoint document library, so I thought it might be possible to apply your tagging method from your other videos to this case. Or do you know any way to change the name column of a document library using power apps?
@@mathiskoppx7848 Attachment control is only to upload files. Video shows how file is uploaded and name is added. You can easily add logic to update it. Check my other videos to get an idea.
Hello Reza, Thanks for the amazing video. When I try to find the library ID using the Grafh explorer, it returns me the Microsoft graph website address instead of my SharePoint one. do you know why?
This is so good Rezaa who needs Netflix when you are in UA-cam :)
I need Netflix :)
@Reza Dorrani We need You ! 😅
Reza - you are a genius! Whenever I am trying to do something in Power Apps, I always come back to you. With this video you get a file into Sharepoint (with no Flow). By using the code you made to get files to show in the pdfviewer (another excellent video) and putting that code into the Record.Value here, you can now backup a file to pdf in another library - I have used it as part of a document control to supersede the old version as a pdf
Thanks so much Brian.
I always think why dont folks mix concepts from 2-3 video and here you are. So happy to hear that you have built a solution using multiple videos.
OMG... you're a GENIUS!!! I've been trying to get my app to upload file attachments for the last 3 weeks using power automate. This worked first try! THANK YOU!!!!!
Most welcome!
Be careful of the file size limit (its small) :)
Reza, I wanted to say that I got a job as a PowerPlatform Developer, and it's mainly because of you, because from your videos I've learnt so much. I will be forever grateful
Congratulations! Very happy to hear the news.
Amazing Reza, I wish we can have another channel on Python from you. I know its too much to ask but your content delivery has been soo simple and straight forward to the community.
I wish I knew Python! If ever I learn it, I would plan on one.
@@RezaDorrani Reza never says NO. :)
Thank you reza, it's the 1st time that I discover this with powerapp, ... really it's great👌
Thanks Salim. I tried to show a different technique to upload files :)
Great video Reza, you are a game changer in powerapps!
Thanks 😊
Thanks!
Thanks so much!
Thanks for the clear explanation Reza! HTTPRequest seems a very powerful method, but how do we know what permissions it has (like the ones you say it has at 8:30 ?) Is it any graph permission that doesn't show as "Admin Consent Required" on the Graph Explorer? Also given that there is now a HttpRequestV2 method which only has access to the groups segment, do you think Microsoft will deprecate the "V1" functionality?
I do not have the list of permissions (not documented). Im not sure about deprecation. Typically when a new version comes out, its recommended to use the latest one.
Nice video. For who is not see Libraries IDs, dont forget activate Document ID service under Site Collection Features.
I did not know that. Thanks for sharing the tip on document ID service
Michal and Reza, I am getting a null array when I try and use the http request to get the library IDs. Are you saying you have to have the Document ID service turned on in order to get a return list of the library IDs or is this possibly a permission issue? Is there any other way to get to the library ids?
Looks like it is needed as per Michal. Is there any issue in turning it on?
@@RezaDorrani I have activated the documents ID Service still I can't get the IDs on the api?
@@mmipeconfidence2923 did you get ID's?? I'm facing the same problem
Amazing stuff!! This opens up new opportunities. Thank you
You're so welcome!
I could see this being useful to me down the road, Good stuff Reza :)
Glad to hear it!
Thank you Reza. Your videos area really amazing!!. Great job!! Even, in the site, there are some lists and libreries, when I make the query, value is empty [ ]
You need to ensure you are consenting in graph api explorer.
Top right there should be an option to consent.
Awesome. I've had mixed results using PowerAutomate to upload files (often seems slow to trigger), so it's great to learn an alternative.
Thanks!
Do check documentation though for limitations with file size and more.
Great tutorial on Attachments --> Doc Library
Many thanks!
Crisp and clear lecture - Excellent
Thanks
This is great. Once the doc is uploaded, this app allows you to edit/update doc metadata, but what if you wanted to re-upload a replacement document as part of the document update process (without interacting with the SharePoint doclib directly)? That would be handy if it could all be done within the app.
Check and see if there is a graph api endpoint for that. I have not tried this scenario.
Hey Reza this is awesome! Question on the Refresh() operation vs. the varReset variable and their differences/expenses on performance: how does the varRefresh consume less resources than Refresh() operation? Aren't both performing a lookup against the data source either way or am I missing something? If you could do a video on how to best leverage updating/refreshing collections after making record updates that write to SharePoint that'd be much appreciated!
For example: I set a collection using a Filter() on a data source. I then create/modify an existing record via a form, but using data from the collection initially (maybe I set varFormRecord to ThisItem from a gallery that feeds from the collection). Now that the data has changed (we updated SharePoint from an Edit Form), what is the best performance-wise way to update the local collection without doing a ClearCollect() operation again? Is this possible?
The Refresh function retrieves a fresh copy of a data source
learn.microsoft.com/en-us/power-platform/power-fx/reference/function-refresh
The varReset technique simply re-triggers the Filter condition which in turns performs a delegable (server-side) query to get items.
A lot is cached in power apps for performance reasons.
I recommend connecting galleries to data source and preferably not load all data or filtered data in collections. Collections are stored locally in power app for user session.
If you need static data, then collections makes sense.
For data on which CRUD is being performed in apps, direct connection is a better option.
Awesome as usual, Reza! I run into an issue I managed to solve this way: When quering drives, it won't return any data unless modify permission right there in the "Modify permissions" tab, and concent Sites.Read.All, Files.ReadWrite, Files.ReadWrite.All, Sites.ReadWrite.All in my logged in session from Graph Api Explorer (all delegated permissions so no admin concent requested as Reza states :) ). Cheers!
Good tip! This one is in the graph api explorer.
Great to see New Power Apps Features... Brilliant Explanation...Keep up the good work..
Thanks a ton
Thanks Reza, you know I've been waiting for this 😁
What great idea on his documents are uploaded, I guess the only Downside is the file limitation. Have you tried it with larger files? Are you aware if this limit is likely to increase at all?
Also is that resetting the gallery by a variable reduces the impact then I'll look into putting that into my Apps in future - Might need to do a few tests tho.
Thanks again, keep up the great work 👌
File size limitation is called out in video. Check comments on video - there are comments and responses for both your questions.
at 10:11 I struggled with enumerate the document libraries under the root site (Graph Explorer). Realized that I need to consent to permission under "Modify permissions" tab.
Consent permissions on graph explorer is needed
@@RezaDorrani thank you so much.
Thank you, this helped
You are the reason why I have a youtube account.
Wow! Thank You
Hi Raza, it is very helpful. Nicely explained. Thank you
Most welcome
Excellent video as always. Well done!
Thank You
Wow! Thanks for informing me a new useful feature with API.
Glad it was helpful!
Hey Reza, GREAT video. Do you have an example of uploading a document to a folder that doesn't exist yet with GraphAPI? I know we can do it with PowerAutomate but was just curious.
I do not
omg you are amazing! seriously, life saver!
Thanks
Reza great video. I got it working but am struggling on uploading the files to a folder in the document library. What is the syntax for that?? Thank you.
Video description has links to documentation. It states how to define folder path.
Hi Reza, Thanks for the great video, I was wondering if we can use the same connector for creating a folder ( POST /sites/{site-id}/drive/items/{parent-item-id}/children)
There are graph api endpoints available for creating folders. Check the graph api documentation.
Reza this is an amazing video! I found it extremely helpful and it works flawlessly. I have one issue that I am running into. I want to sort by name in alphabetical order. However, the name column in SharePoint when used to sort gives a Delegation warning. But the Title column does not. Do you know of a way when uploading using the GraphAPI to set the Title column in SharePoint to the Attachment Name?
Thanks!
You cannot set metadata using file upload action. Even in SharePoint, one has to first upload file and then set its properties.
You would need to first upload file and then use patch function to update its properties. I do not have a specific video on this though.
@@RezaDorrani Thank you for the speedy reply! If you do create a video that would be awesome. I tried using the Patch in graphAPI and couldn't get it to work. For now even though I didn't want to use Power Automate I just created a simple flow and sais when a file is created update the title column.
@@drscott212 I make videos when I receive multiple requests on a topic. Every quarter I ask subscribers for topic suggestions on Community Tab of my channel. Most voted idea gets added to my backlog. Make sure to post this idea whenever I post the next topic suggestion post.
You are the man! Thank you for this video
Most welcome
Thank you so much for these Reza!
Most welcome
Amazing as always Reza. I wonder if there are end points for lists...
There are :)
Check the graph api documentation
Amazing, Reza!, as usual.. :)
Thank you! Cheers!
Amazing video and great knowledge shared..thanks Reza..👏👏
Glad you liked it!
Great video!!! It saves extra work of creating a power automate flow. Could you please let me know if is it possible to check if a folder exists and if folder does not exists then first creating a folder then uploading the files inside it
Possible, however for that a flow would be needed as the Get method for graph is not interpreted by Power Apps.
I learn something new, thanks for the tutorial as always. Supposed I uploaded 2 files, I need to update a column dynamically based on the selected ID from the gallery. Is there an easy method to update the metadata?
First a file has to be uploaded. Metadata can be set after file upload is complete. You can use patch function or form control or graph api to update metadata.
Thanks and right on time for a solution for my problen. Yo're the best ☺
You're welcome 😊
Please also check file size limitation as well shown in end of video :)
We can directly patch it as well using filecontent in library without graph api, but thanks to you I learnt graph api approach as well
Great 👍
May I ask how did you upload the file just using patch? Without using power automate ? Thanks
@@sebastianmarin7290 Uploaded file using api directly from power apps. No usage of flow.
Hey Reza,
Thanks for the awesome video.
I have a ask here how to update the metadata of the documents uploaded?
You would need to get context of item(file) created and then update metadata as a separate request. You cannot upload and update metadata with same api call.
@@RezaDorrani I have the context but how to update the metadata using office365groups httprequest.. in which parameter we need pass the body
I have not tried updating the metadata so do not know the specifics. You will need to check the graph api documentation for the same.
Thanks Reza for the idea.
Is there any possible option to update file properties while performing the Upload action?
Not possible with upload function.
It would have to be a separate function call after upload is performed.
@@RezaDorrani I have had the opportunity to implement this concept in my project, and it works fine. However, when it comes to the Desktop player, Upload action is not working. Do you have any ideas or suggestions on how to resolve this issue?
@@MsMartin360 I have not tested with desktop player hence not sure what the fix would/could be.
@@RezaDorrani Hi, I finally found the solution. We need to use "Text(ThisRecord.Value, Language())". Thank you for your support.
Thank you so much Reza for sharing!
Most welcome
Thanks Reza ,this is awesome. My question is can we add metadata from this request?
No, since the API only supports uploading files (This is also what happens in a doc lib. You first upload a file and then set metadata). Once file is uploaded, you would need to get context of item and then fire another query to update the metadata.
@@RezaDorrani Thank you very much 🙏
Hi @reza, your content is always helpful. I have a question here related to this video
In this video, we saw that we can upload a file in any Sharepoint document library. Can we make this process completely dynamically? This means you will get an option of different SharePoint sites - document library in a drop-down where they want to upload? and File viewer for different SharePoint sites in the Power app.
Possible but you would somehow need the list of site ids and drive ids where files are being uploaded.
However, to showcase data, you would need to connect to each of those data sources.
Hello reza
Thanks for sharing your videos, tutorials, and the valuable information you've provided.
I have a question, I have a requirement to use sharepoint library to store files through power apps the files have a large size so can I open a link directly from power apps to the library and allow user to upload his files?
Is there any points to take into consideration when doing that?
Thank you again
I have not built any scenario with linking over to SP so not sure about considerations.
1 thing for sure though - you will need to provide a refresh feature in app to load the latest files.
Thanks for al your great video's life savers.
Is it possible that this method doesn't work with a sub sites ? My document library doesn't show up
Thanks Steven.
As per graph api docs, it should work with sub site as well.
Thank you so much Reza! Very helpful walk through as usual, and also to learn about the HttpRequest method on the Office365Groups connector - lots of interesting possibilities via the MS Graph API.
Agreed
Thanks Reza! Top tier content always. Question: I assume this would work with Azure blob storage, correct? And, if so, would that be more efficient and scalable?
This video is specific to SharePoint doc library. Not sure about Azure blob storage.
This was even better method for uploading files than with flow. And i was able to get it work this time 🙂 But i like to use dynamic variable for upload to target folder, instead of root. I manage to insert variable between http-request, but this make only whole path folders to root.
Thanks!
Not sure how I could help here.
@@RezaDorrani ok. I figure it out some day. I have learned how to use Graph API in practice. Thanks to you. You are greate teacher!
@@RezaDorrani there it was, when watch the video to the end. Using Substitute solve my issue 😂 My App works now perfectly. Thanks!
Thanks, works like a charm!
👍
Thank you so much Reza, you are an inspiration. I have a question. how can you upload files to the document library with metadata please?
Uploaded files does not have open to set metadata. First file has to be uploaded then metadata can be set.
Amazing Reza 👏
Thank you! Cheers!
Great video, Thanks! Is it possible to set status in the ForAll loop?
When uploading document, setting properties is not possible.
Thanks. This is useful as we can now remove our power automate flows and use the direct connectors. We have struggled with power automate flows when we move our app and associated flows from one environment to another using solutions. The connection between the app and the flows always get disconnected when we move to higher environment as managed solution. We then have to edit the managed app and individually hit refresh on each of the associated flows.
We also have flows that set permission on the list items in sharepoint online. Unfortunately, we have not found Graph API calls to update list item level permissions.
There are known challenges with flows with solutions that are connected to an App. All of them are well documented and hopefully the experience would be seamless in future.
I have not explored all of the graph endpoints hence not sure if it has the permission apis for SharePoint.
Great stuff! Can’t wait to try this out. I’m curious Is it possible to send values for columns in my document library? E.g. I have 3 text and three choice columns regarding the document that I want to „patch“ when uploading via graph api. Can I do this with the graph API call as well with parameters or something like that?
You cannot do that on upload of file. Can be done after file is uploaded however, we can straight out leverage the form control for that as shown in video.
Okay. So giving my user the opportunity to for example assign the document to a project and status in powerapps via Dropdowns and sending his selection via graph api to the document library is not possible?
@@einfachmachengmbh Possible but only after doc is uploaded. Same behavior as SharePoint.
Sick! That's very nice stuff Reza. Do I still need to add logic for duplicate files that are uploaded again in the SP doc library? Also, is it possible to add other metadata to the file via the graph api?
Thanks!
You can always use the Lookup function to check if file already exists prior to executing the graph api call. Currently, if file is uploaded with same name, it will override the existing file (same as what SharePoint does).
Video shows how to update the metadata via Power Apps. When uploading file, one cannot set metadata (similar to SharePoint behavior). Once uploaded metadata can be set via form control in Power Apps (As shown in video).
@Reza Dorrani I see, thank you for your answer. I skipped through the first part at first but looking back at it I see how you change the metadata after the file upload. Amazing Reza!
Another great and very useful video Reza ... thanks very much!
My pleasure!
Thanks Reza, perhaps this solution will fix another problem I have when using Power Automate. When I upload a document in Power Automate "Copy file" from 1 library to another with the "replace" option we lose the previous versions of that document.
Video shows create new file. Check graph documentation to see if it has endpoints for copy file and more.
Hi, Reza I have a scenario like iam sharing a url through power automate flow by send email(v2) action. That link will expire after 21 days is there any idea about this Reza please help me
@@khasimshaik2606 I have no idea about this. Please post your query on forums at powerusers.microsoft.com
Thanks Reza, Great video. Only question I have here is it will not upload files larger than 50MB. Can you guide me any solution for larger files. Thank you
There is a graph api endpoint to upload large files as well (Upload large session - resuamble file).
The resumable upload technique first requires a POST method to get the upload session link. Power Apps does not interpret the response as power apps is not aware of the response schema (will always return boolean true).
So, we would have to call flow to interpret the response and get the URL to upload the file in byte sized chunks.
This would be a complex process and better off to use flow to load the files.
Important to note that power apps are designed keeping the mobile experience in mind. Uploading large files is not going to performant as all the work will be performed on the mobile device (performance + bandwidth challenges).
@@RezaDorrani What is the max file size we can upload it to Sharepoint (through power automate or graph api). In DV it's around 128 Mb (i have increased max file attachment size upto 128MB in environment advance settings) but i don't know that will support for Sharepoint also
Could you help me on that??
@@muthusamythangavel3985 Dataverse file size has nothing to do with SharePoint. The graph api has a limit and I have that mentioned in video. I will recommend checking on forums in case someone has a workaround powerusers.microsoft.com/
Incredible tutorial! I successfully made my power app using your video. One question, instead of uploading all files to root, is there a way to upload to a specific folder? I have 2 screens. 1st screen, has user input their information with a Next button; Next button when clicked will create a folder in the document library based on the user's name and go to second screen. 2nd screen will allow multiple file uploads, but uploads to root. how can i specify the newly created folder for the files to upload to? Thanks!!
Possible! I think in video itself I give a demo of uploading to a folder. Check API documentation for how it can be uploaded to a folder.
@@RezaDorrani appreciate it! Thanks!
Ah! At last 🥳🥳🥳🥳🥳
:)
This is a really good new thing I learned today. I can see this approach supports a file size of 4 MB only. What is the approach to uploading large files in the SharePoint library without using Power Automate?
Power Automate
@@RezaDorrani You mean we need to use Power Automate to handle the actual upload of file chunks using SharePoint REST API? Automate would use HTTP requests to SharePoint to upload chunks of the file?
@@dhananjaykharade2711 Chunking will be super complex. Power Apps is not designed for uploading large files. Max I would say 20 MB per file. Beyond that you will see performance degradation.
@@RezaDorrani okay, what is the file size limit for uploading files using Power automate?
@@dhananjaykharade2711 I don't know the file size limit for power automate. It's about what's max file size power apps can handle as the file will be uploaded in apps.
Hi Reza, love your videos! Wanted to ask you if you have ever tried to create a folder directly from PowerApps also? I tried it with graph API, but powerapps asks for the body of the request to be provided in binary format, and I do not know how to transform the JSON to binary.
Thanks!
I have not tried creating a folder
Hi Reza. This was a very good and instructional video. I am new to PowerApps, but I have spent two days on your video, and now I got everything to work except the varCurrentPath. I want to save the files in a subfolder. I am on Sharepoint with Norwegian language, and I cant get it to work with "Shared documents/". Can you explain how I can find the root name of my Document library, and also the syntax of varCurrentPath
I do not have a specific video on this scenario. I had done it as part of one of the demos. In fact I did a video recently where I showed a full document library experience. I shared the entire code base (Member only). Link is in that videos description. Here is that video -> ua-cam.com/video/JxPznTUsaiQ/v-deo.html
Hello Reza, great video tutorial!
Was able to achieve as per your tuto.
One additional question: is it possible to upload in subfolder of root, but dynamic using item title as reference? As I already created subfolder with title as folder name? Thank you for your input. Jack
I think I mentioned in video that subfolder is possible. So I would say Yes.
@@RezaDorrani Hello Reza, indeed, you mentioned it is possible, with created folders. But any possibility to refer to dynamic field such as item title?your hint is appreciated. Best.
@@JeanJacquesQuang Possible. You simply concatenate the title in it. Check concatenate function in power apps.
@@RezaDorrani Reza, thank you very much for the hint! I'll look into it with concatenate function. I see it now! Great. Thanks again.
Please keep your fabulous videos. Jean
Awesome video Reza
Thanks
Hi Reza, great video again. thanks for this. I want to know how can we make the Graph api endpoint dynamic. Basically the document library id, is there a way it can be made dynamic?
You could call graph api to get libraries, list it in dropdown. User can select and based on the selection pass that document id. That would be one way.
Reza, why has Microsoft not included an attachment control in the group of controls under Insert? Seems that this would have been in the first version of Power Apps to me.
I wish it was a control readily available
Hi Reza, as always, very interesting solutions. One question I do normally use patch to save my records to SharePoint list, is it possible to add this solutions at end of my patch and the attachment will save on same record just patched? 🙏
This video is related to document libraries. You are trying to attach items to SharePoint lists. I have done multiple (4+) videos on uploading files to list item attachments. Check my playlist on list item attachments.
Thanks replying, my question was to save the attachment with my records to SharePoint list using API Graph and patch is it possible? NOT FLOW
@@basehumax Check my videos - I have shown how to do that without flow. It uses form control. Patch does not support attachments.
Learning continue... Thanks for the awesome lecture
My pleasure
This has been an excellent tutorial. I had this working flawlessly.. but all of the sudden, I have no filename in between root:/ and /content on the output.. I wonder if they changed something
I have not come across the mentioned issue and hence not sure what the fix for your issue is. I recommend posting your issue with screenshots on the forums at powerusers.microsoft.com
Appreciated work 👏
Thank You
very nice tutorial, how to upload a attacment and a note(multi line text) with the PUT? in short, i have a attachment and a text in a variable.
Upload file action only uploads the file. After the file is uploaded, you would need to execute a Patch function to update any metadata.
thx any idea where i can find a video?@@RezaDorrani
@@bartbossuyt I do not have a specific video on it.
Thanks reza, I had seen this method once or twice before. It's ust that 4mb limit is just a show stopper for me. If you have to worry about the file size uploaded. If there is a way to send that in chunks then that would be something.
Thanks Phil!
There is a graph api endpoint to upload large files as well (Upload large session - resuamble file).
The resumable upload technique first requires a POST method to get the upload session link. Power Apps does not interpret the response as power apps is not aware of the response schema (will always return boolean true).
So, we would have to call flow to interpret the response and get the URL to upload the file in byte sized chunks.
This would be a complex process and better off to use flow to load the files.
Important to note that power apps are designed keeping the mobile experience in mind. Uploading large files is not going to performant as all the work will be performed on the mobile device (performance + bandwidth challenges).
@@RezaDorrani we just have scenarios where people would input data and provide documents / images as evidence. A lot of times people are out in areas where mobile connectivity is the only option. They end up emailing documents or worse third party doc storage which breaks the process.
I see it as a graph limitation as opposed to Powerapps. A little increase to 10mb would cover a lot.
Always grateful for you content Reza it explains ways of doing common things that business apps need to do but are not always straight forward to achieve.
@@Worrelpa I agree with at-least having 10 MB to work with.
Thanks Phil for your kind words
Great video thanks for sharing
Most welcome
You're Great, thank you for share!
Thanks for watching
As always thank you so much, just a problem... Can't find a way to list id of libraries of a subsite, the id of the subsite is the same as the parent and when I run the query to list the drives they won't appear :(
I am not sure about subsites. I have not tried it. I recommend checking or posting your query on the forums at powerusers.microsoft.com
Hi Reza, thank you, again, for your videos!! Many people would be lost without you.
I believe I have to consent for permissions to see the drive id, because my query gives me an empty value as a result. Am I correct? Which permission should I consent to to being able to see the id of my library?
In graph yes. It uses your identity.
I am also experiencing a similar issue. I logged into the Microsoft Graph using the same user account that is the owner of the SharePoint site and has full control over the document library. However, I am still receiving empty results when trying to retrieve the drive ID. The document library does not have broken permissions, and the site ID should be correct (I also tried obtaining the site ID using PnP, and it was the same).
Does anyone have any suggestions on what could be causing this issue?
@@urosgabrovec check video comments. Someone did post something related to it.
Thank you Reza for this tutorial. What could be the problem? I am stuck in the enumerating of document libraries as it shows an empty date on value. I tried with different sharepoint sites and I the site ID is correct. Hope you can address my issue. Once again, thank you.
I think someone did run into a similar issue and may have mentioned the fix. It requires some service running on site. You would need to look through the comments.
@@RezaDorrani Thanks for the response. Appreciated it.
Thanks Reza 🙏🙏🙏
Most welcome
Where was the "Reza Here" ?
Reza forgot :)
Hi Reza, this is very nice and elegant solution however would it be possible to tag each file before we upload to sharepoint? We are working with drawings and each have a unique number. Currently I have parse json in power automate and form control in power apps. Could we tag this attchments before we upload them to sharepoint with graph api? Many thanks Norbert
You cannot upload and tag at same time. You can take user inputs for properties, first upload and then Patch an update to its properties.
@@RezaDorrani thank you much appreciated!
hi Reza, great video, what about creating or deleting folders using the Graph API?
I'm sure there are APIs for that as well but not something I have tested
@@RezaDorrani I’ve been trying to use the graph api http request examples, but the file/body parameter appears to only accept binaries, not a json record
I will recommend posting your issue with screenshots on the forums at powerusers.microsoft.com/
Great video, thank you.
Most welcome
Hi, @rezadorrani. Excellent content, as always. How do you set document library properties or column values using this method for document uploading? Also is there any way around the MB limit? Or could you get the list ID or document ID as a return value?
You cannot upload and set properties for doc library. First one has to upload the document and later can set properties.
There is no workaround the MB limit for this api.
Reza, great work!!
Now I just have to figure out how to copy files. I’m trying to make it so users don’t have to manually upload the same file again when the second “project” is referring to that project.
One of my biggest problems I have though is when a user download a file via a link using download and not launch, edge may respect it and download it and chrome may still launch it. I don’t want the user to overwrite the original file and when it launches, it allows them to edit it. They could “save as” on their computer, but that will be forgotten by many users.
Is there anyway that I can make it so that they can’t edit the original file by forcing it to download and not allow it to launch❓ Also, with downloading, they don’t easily see the actual file location either.
Thanks Ray.
Your scenario is not something I have come across or tried out. So not sure what the possibilities are. Reality is user will need access to SharePoint and nothing stops a user from taking these actions in SharePoint- uploading file with same name which would override.
Hello @Reza,
any insights on what's max file size limit when uploading file using this method or using power automate?
I have called it out in this video.
Power Automate allows higher file sizes.
Hello Reza, the video and the explanation are great, my only question is, do you need any premium functionality to be able to do this?
custom connector is a premium feature
Thank you, thank you, thank you 😊
You are so welcome!
@RezaDorrani do you have a video for a multi-level document approval process where the 2 levels of approvers change with each document? Selecting a manager from Office 365 doesn't work for me since the approvers aren't managers or in specific departments
Thank you
@@nikkijoy226 I don’t remember having a video on this topic
@@RezaDorrani thanks for responding so quickly. I'll keep looking. My problem is getting the flow to send the email to a chosen recipient by I keep getting errors
@@nikkijoy226 Best place to post issues is the forums at powerusers.microsoft.com
Thanks Reza good thing somehow helps, Q: Can the user upload/create folder instead of single docs? IF yes , Is there size limit? IF not So , the only option is that they need to upload folders in the backend (doc-library)?
I know It's a bit complicated as doc is involved, wish MSFT make a direct connection like list to manipulate the backend 😣pls MS do something, For my previous req The closest soln i found was from Andrew Hess , which meets my metadata gathering req with the doc, even that's more applicable only for single doc plus small size 10MG aint' doable.
Now my req includes folder structure I mean not only display but also to create. Literally we wanted to mimic the whole doc library features in PowerApps so users don't need to access the backend. I think for now i better stick to the doc library not pull everything in PowerApps so i don't have worry about metadata /folder creation /size blalala ...
Folder upload - No
Small file sizes are the challenge with most of the approaches including the one I have showcased in emails. Power Apps is designed keeping mobile experience in mind - large file sizes is a definite challenge on mobile devices.
There are APIs in graph to create folders and then add files in folders but all of them will have size limits.
@@RezaDorrani Thank you Reza for the speedy response. That's all I wanted to confirm before investing anything in it . Have a beautiful and blessed 2023 .
Hi Reza, as always, very interisting video. One question : you use the Attached file datacard from a form control. Is it possible to do the same logic with a Import Control (already included in PowerApp) instead of creating a form and deleting it after you copied the attachment control ?
Kind regards
Import control as far as I know only runs in edit mode of app.
Hi Reza,
When I needed it most, this video saved the day. I appreciate your thorough explanation, which made the learning process go smoothly. On the basis of best practices and an effective screen run, I have a question for you. I must save my submitted files in a document library and I have five upload controls on one screen linked to a SharePoint list. All that is left for me to do at this point is to push all of the uploaded files to the library after the form has been submitted (in separate 5 fns because the controls are different). Is it advisable to include everything in the Submit button's OnSelect property? What are your recommendations?
You can submit them on click of single button one after the other. Big challenge is that the response is a problem as you would not know if it succeeded or not.
My next video will show something new which would help in evaluating the response.
@@RezaDorrani Thanks for the response. I look forward as always for your next video. I tried to upload file and ended up in a run time error. How can we identify the reason behind response error?
As I said, the response does not give any information. Wait for my next video
@@RezaDorrani Yes sure. Always
Thanks for this approach - it is a great alternative to using Flow. Is it possible to also populate the file(s) and their metadata all in the same Graph call? In other words create the file and populate all of the metadata.
Not in a single graph call.
Another useful video. 🎉
Would there be any advantage if you store the attachments to SP document library instead of SP List attachment column?
Glad to hear that!
Doc library has many advantages of list attachments.
Il put a few forward
- file size
- versioning
Appreciate for taking your time writing your feedback. But will this solve as well of disabling the auto compress in Power Apps when uploading an image file?
@@charlesdawnbeltran9603 No, thats a Power Apps thing and has nothing to do with list or library.
Hi, Reza as always, your video was just what I was looking for!! I just face one issue: I can not seem to find a way to rename the file in the attachememt control. I want to avoid using a flow to do this, and the method you used for tagging lists attachements does not work for libraries [ClearCollect(Defaults(datasource).Attachements)]. The reason I need to rename the files, I.e. make them unique is because if there is a file with the same name, it will be overwritten without any notification if I use the Graph API. Is there a way to fix this? Would really appreciate some help since I could not find a solution online!
This video is about uploading files to document library and not list item attachments. I have done other videos on list item attachments and renaming them. You can check those.
@Reza Dorrani Yes, but you are using an attachment control to upload to a sharepoint document library, so I thought it might be possible to apply your tagging method from your other videos to this case. Or do you know any way to change the name column of a document library using power apps?
@@mathiskoppx7848 Attachment control is only to upload files. Video shows how file is uploaded and name is added. You can easily add logic to update it. Check my other videos to get an idea.
Hello Reza, Thanks for the amazing video. When I try to find the library ID using the Grafh explorer, it returns me the Microsoft graph website address instead of my SharePoint one. do you know why?
No idea.
@@RezaDorrani it was a consent that was missing......founded already
How did you solve it ?
Thanks, great video
Glad you liked it!
Great, thank you!
You are most welcome!
Hey Reza, thank you for this video. Is there a way to implement error handling using this method?
Currently no as power app has no context of what happened.
@@RezaDorrani Thank you for your timely response!