Loading...

Managing Public SharePoint Documents for Power Apps Portal and Internal Documents Using Cloud Flow (Part 8 of 8)

Managing Public SharePoint Documents for Power Apps Portal and Internal Documents Using Cloud Flow (Part 8 of 8)
This is the eighth post in a series of Automating SharePoint Integration with Dataverse using Power Automate. You can check out the other posts via these links (Part 1, Part 2, Part 3, Part 4, Part 5, Part 6, Part 7)

Power Apps portal has the capability to upload and display documents to and from SharePoint directly to the Document Library related to a record. But sometimes, there is a requirement to manage two types of documents, one for the public documents visible to the portal user and the private documents which are supposed to be visible only for the internal Dynamics 365/Power Apps users. This can be achieved by uploading the public documents for the portal user to the Document Location which is created first and the private documents for the internal users can be uploaded to the second Document Location. (Special thanks to Gus Gonzalez for sharing this solution by Nicholas Hayduk.)

We can automate this solution by automatically creating the x2 Document Locations with a cloud flow as soon as the record is created. In the Part 1 post, I have explained how to automatically create SharePoint Document Location OnCreate of the record. This is the extension the previous solution with the additional steps to create the second Document Location.


These are all the steps included in the cloud flow for this solution. The following cloud flow is triggered on create of the Contact and creates the public Document Location for the portal user as in the Part 1 post and then, creates the private Document Location for the internal users.

The first part of the cloud flow is almost the same as the the Part 1 post except the SharePoint folder path and Relative URL with "_Public" postfix (as highlighted in the screenshot above).

After creating the first Document Location, delay the flow for 5 seconds to make sure that the timestamp of the second Document Location is different from the first one. The steps for creating a SharePoint folder and Document Location are almost exactly the ones as the public one except the "_Private" postfix (as highlighted in the screenshot).


After creating two Document Locations, the documents uploaded to the first Document Location (red highlighted ones) can be visible on the portal and the documents uploaded to the second Document Location (green highlighted ones) can be visible only to the internal Dynamics 365/Power Apps users. 

The user can see the documents from both location by manually selecting "All Locations" from the Document Location menu but that selection cannot be default. When the internal user opens the Documents tab, the Document Location in the first menu item is shown (e.g. Private Documents in this case when the Document Location name is sorted alphabetically).


Summary

When the SharePoint integration from Power Apps portals is enabled, the users can see all the SharePoint documents related to the record but we can upload the documents for internal purpose to the secondary Document Location and keep those hidden from the Portal user.

Published on:

Learn more
Linn's Power Platform Notebook
Linn's Power Platform Notebook

A blog about Dynamics 365 and Power Platform (canvas apps in Power Apps and flows in Power Automate).

Share post:

Related posts

How To Create Copilot Custom UI Widgets In Power Apps

You can use Copilot to show custom UI widgets built-in Power Apps. UI widgets replace ... The post How To Create Copilot Custom UI Widgets In ...

5 hours ago

Power Apps Fundamentals + Microsoft Fabric Integration Series # 1: Introduction to Power Apps and Microsoft Fabric: Building a Unified Business Application Platform

Introduction Modern organizations generate enormous amounts of operational and analytical data every day. Business users need applications to ...

14 hours ago

Microsoft Power Automate – Export object-centric process mining data to Microsoft Fabric semantic model

We are announcing the ability to export object-centric process mining data to Microsoft Fabric semantic model in Microsoft Power Automate. Thi...

2 days ago

Power Apps- Enhance row summaries in model-driven apps

We are announcing the ability to enhance row summaries in model-driven apps in Power Apps. This feature will reach general availability on Jun...

3 days ago

Microsoft Power Automate – Configure notifications for desktop flow checker in admin portal

We are announcing the ability to configure notifications for the desktop flow checker in the admin portal in Microsoft Power Automate. This fe...

3 days ago

Power Automate – View property value expanded inline in the new cloud flow designer

We are announcing the ability to view property value expanded inline in the new cloud flow designer in Power Automate. This feature will reach...

3 days ago

Calling Dataverse Actions and Functions from Power Apps Code Apps

When building Power Apps code apps, one of the most powerful things you can do is reach directly into Dataverse to trigger business logic. Whe...

3 days ago

25 Real-World Power Automate Scenarios for Assignment Practice (Beginner to Advanced)

Automation is no longer optional in modern businesses. With Microsoft Power Automate, organizations can streamline approvals, notifications, i...

3 days ago

Power Automate: less function

The 'less' function in Power Automate compares two values and returns true when the first is smaller. Learn the syntax, string gotchas, and be...

4 days ago

Respond to a Power Automate Flow Approval in a Power Apps Custom Page or Canvas App

How to respond to Power Automate approval requests directly within a Power Apps custom page or canvas app, rather than email buttons or in Mi...

5 days ago
Stay up to date with latest Microsoft Dynamics 365 and Power Platform news!
* Yes, I agree to the privacy policy