cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jpm
Frequent Visitor

documents automatically in created subfolders instaed all the files in the root

Dear Community,

 

I made a Common data DB linked to SharePoint document library

 

the purpose is (or was 😞 ) to place all the dociments in the root and then to filter them Following metadata and DB items

 

the issue is the system automatically create a subfolder for each DB item in the root (I remind the purpose was all the document in the root)

 

I can't find the option menu for fix this issue

 

can anyone help me?

 

thanks in advance

 

JP

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @jpm 

 

Below is a screenshot of a Flow that I use to do a similar thing that you want to do.

  • First I create a SharePoint folder - you could skip this step if you want the documents in a root SharePoint location that already exists
  • Then create a Document Location record in CDS and point it to the SharePoint folder

 

Annotation 2020-04-21 193825.png

 

Expanding on the Create a new Document Location - Show advanced options

- The Parent Site or Location field is a lookup to the CDS Document Location record that represent your SharePoint location

- The Regarding field links your entity record to the Document Location record

- The Relative URL field is for a sub-folder - in your case you won't have one

Annotation 2020-04-21 1938252.png

 

 

I hope this helps.  As I write this and review what I have done I can see that it is not easy.  It would be good for you to get an understanding of the Document Location entity in CDS before you start configuring the Flow.

View solution in original post

4 REPLIES 4
HSheild
Super User
Super User

Hi @jpm ,

 

Unfortunately this is how the SharePoint integration works with CDS by default.  It puts documents into a folder for each record.  

 

The folder (document location) is created in SharePoint when the user first accesses the Documents section associated with a CDS record.  However, you can stop this from happening a create your own document location using Power Automate.  If the CDS record already has a SharePoint Document Location associated with it when the user access the Documents section on the record then another location is not created.

 

What I have done in the past is create a Flow that

  1. Triggers on create of the CDS entity that you want documents stored against it
  2. Creates a Document Location record for the the CDS record

This will stop the CDS - SharePoint integration from creating a folder and document location where you don't want it to be.

 

Hope that makes sense.

 

-----
 
If this post has answered your question please consider it for "Accept as Solution" or if it has been helpful give it a "Thumbs Up".

jpm
Frequent Visitor

Dear HSheild,

 

thank you for your reply… I feel it will help...

 

it makes sense

 

So I tried to settle this flow in PA

 

for the triggering part… no prob..

 

for the action part, I encountered another question..

 

I verified in both applications (SP and CDS) and did not find the item to be updated (storelocation or soever,...)… even create a new record in an entity (or create a new entity … then where the field must be linked into SP-CDS connector)

 

May I request you witch Application environement has to be updated (and which item…or process)?

 

thank you so much in advance

 

Have a nice day at the other part of the globe 🙂 

Hi @jpm 

 

Below is a screenshot of a Flow that I use to do a similar thing that you want to do.

  • First I create a SharePoint folder - you could skip this step if you want the documents in a root SharePoint location that already exists
  • Then create a Document Location record in CDS and point it to the SharePoint folder

 

Annotation 2020-04-21 193825.png

 

Expanding on the Create a new Document Location - Show advanced options

- The Parent Site or Location field is a lookup to the CDS Document Location record that represent your SharePoint location

- The Regarding field links your entity record to the Document Location record

- The Relative URL field is for a sub-folder - in your case you won't have one

Annotation 2020-04-21 1938252.png

 

 

I hope this helps.  As I write this and review what I have done I can see that it is not easy.  It would be good for you to get an understanding of the Document Location entity in CDS before you start configuring the Flow.

View solution in original post

jpm
Frequent Visitor

really thank you

 

even if creation of a link did NOT avoid SP to create folder (it is a sight-folder Indeed), it really helped me

 

… and my problem seems be be solved

 

have a good day

 

thx

 

Kind Regards

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

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

MBAS on Demand

Microsoft Business Applications Summit sessions

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

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Kudoed Authors
Users online (58,942)