web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Integrating SharePoint...
Power Apps
Suggested Answer

Integrating SharePoint in Model Driven App

(0) ShareShare
ReportReport
Posted on by 41
I have a couple of problems that I am trying to figure out to achieve a Dynamic Document location for every record for my Model Driven app. It might not be possible what I want to do.
 
I would like to create a dynamic document location, but it would depend on the name of the record. This would make the document location unique for every record.
 
Scenario
My SharePoint Site has a folder called "Documents". In that folder is another folder called "Projects" and in that Projects folder are a bunch of different folders with acronyms (i.e. AAA, AAB, AAC, etc). The record that gets created from the Model Driven app will be titled something like "AAA - Project Name" or "AAC - Project Name" and so on. And then in that acronym folder would be the folder (which would be the title of the record created) that houses the documents for that record.
 
So, the final pathing would like something like
sharepoint.com/site/[sitename]/documents/projects/[acronym]/[project name]/files
 
I would like to be able to extract the acronym from the title of the record and use that to link the location of the SharePoint onto that record.
 
I'm not sure if this is even possible. If not, that is fine, but I just don't know enough or could find information on how to do what I am looking for.
Categories:
I have the same question (0)
  • Suggested answer
    Jon Unzueta Profile Picture
    1,827 Super User 2025 Season 2 on at
     

     This is possible using Power Automate and SharePoint integration with Dataverse in your Model-Driven App. Here's how you can achieve dynamic document locations based on record names, including extracting acronyms and creating folders accordingly.


    🧩 Your Goal Recap

    You want to:

    • Extract the acronym from a record title (e.g., "AAA - Project Name" → "AAA")
    • Use that acronym to locate a folder in SharePoint (Documents/Projects/AAA)
    • Create a subfolder named after the full record title (AAA - Project Name)
    • Link that folder as the Document Location in Dataverse

     Step-by-Step Solution

    1. Extract Acronym from Record Title

    In Power Automate, use an expression like:

    split(triggerOutputs()?['body/yourTitleField'], ' - ')[0]

    This gets the acronym before the dash.


    2. Check if Acronym Folder Exists in SharePoint

    Use the SharePoint "Get folder metadata" or "Send an HTTP request to SharePoint" action to check if:

    /Documents/Projects/[acronym]

    exists. If not, create it.


    3. Create Subfolder for the Record

    Use the "Create folder" action to create:

    /Documents/Projects/[acronym]/[record title]
    

    This will be your document location.


    4. Create Document Location in Dataverse

    Use the Dataverse connector to create a new Document Location record:

    • Relative URL: Projects/[acronym]/[record title]
    • Regarding Object: Link to the original record
    • Parent Site or Location: Your SharePoint site or root document location
    🏷️ Tag me if you have any further questions or if the issue persists.
    ✅ Click "Accept as Solution" if my post helped resolve your issue—it helps others facing similar problems.
    ❤️ Give it a Like if you found the approach useful in any way.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 740 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 342 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard