cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

link sharepoint document library columns to list - to create charts/dashboard

Hi everyone, 

 

I'm trying to create a dashboard on a Sharepoint site, containing column information from a document library. 

 

Unfortunately my organization doesn't allow custom scripting so I need to (I think) create a list which gathers (almost duplicates) the info from the columns next to files in a document library as the build in 'quick chart' feature can apparently only retrieve info from a sharepoint list.

 

How can I do this and/or is there another solution which doesn't require me to create a list which is basically a duplicate from the info found in the document library? Thanks in advance!

 

Best regards,

Laura

1 ACCEPTED SOLUTION

Accepted Solutions
Jay-Encodian
Community Champion
Community Champion

Hey  @Anonymous 

Correct, the quick chart web part will only pull data from a SharePoint list... or manually entered data.

To sync data between a library and list try this:

1.png

The trigger is firing on the SharePoint document library... it then queries the SharePoint list to see if an item exists where the 'Document ID' (a column I added) is equal to the ID of the file the trigger fired on. If there isn't an item then create one, if there is an item then update it. Does that make sense?

Here's the example execution data where the item in the list didn't exist:

b.png

 and where an item does exist:

b.png

 

The Flow uses the 'Document ID' field in the list to correlate the item 'ID' in the library... creates if an item doesn't exist an then updates after.

HTH

Jay

-------------------------------------------------------------------------

If I have answered your question, please mark your post as Solved.

If you like my response, please give it a Thumbs Up

View solution in original post

25 REPLIES 25
Jay-Encodian
Community Champion
Community Champion

Hey  @Anonymous 

Correct, the quick chart web part will only pull data from a SharePoint list... or manually entered data.

To sync data between a library and list try this:

1.png

The trigger is firing on the SharePoint document library... it then queries the SharePoint list to see if an item exists where the 'Document ID' (a column I added) is equal to the ID of the file the trigger fired on. If there isn't an item then create one, if there is an item then update it. Does that make sense?

Here's the example execution data where the item in the list didn't exist:

b.png

 and where an item does exist:

b.png

 

The Flow uses the 'Document ID' field in the list to correlate the item 'ID' in the library... creates if an item doesn't exist an then updates after.

HTH

Jay

-------------------------------------------------------------------------

If I have answered your question, please mark your post as Solved.

If you like my response, please give it a Thumbs Up

Anonymous
Not applicable

Hi @Jay-Encodian

 

Unfortunately I do not know how to add a custom column to the actions in the flow. Would you be able to advise on how you did this?

Also, does this flow also copy all column information from the document library with it, or does it only copy the file name in the list?

 

Thanks!

Laura

Hey @Anonymous 

The column is added to the SharePoint list, not Flow itself 🙂

1.png

 

You can choose what data you wish to copy... the 'Create Item' and 'Update Item' actions will display the available columns on the target list... you just need to pass data to which ever columns you want to set a value for.

HTH

Jay

Anonymous
Not applicable

Hi @Jay-Encodian 

 

Unfortunately I keep getting an error when testing (see picture), with as error, that the column 'DocumentID' does not exist. Even though I have created the column in both the document library as sharepoint list.

But, I believe once I'm able to sort this, the flow should be able to work 🙂

 

Capture8456.PNG

 

Thank you for your help!

Best regards,

Laura

Hey,

You only need to create the Document ID field on the list. Every item in any list document library has a ID field... this Flow associates document in the document library with items in the list by writing the documents ‘ID’ value into the items ‘Document ID’ custom column... that way you can use the current documents ID value to find the related item in the list by querying the Document ID column.

You may have an encoded space in name of your column... traveling at the moment so can’t send a screen shot... but, go to the list settings and click the Document ID column... there should be parameter at the end of the pages URL called Field which contains the internal name... you need to use that name in your Odata query.
Cheers J
Anonymous
Not applicable

Hi @Jay-Encodian 

 

Unfortunately I have not been able to get the flow working as the flow says my expression in the condition action is not correct.

I wrote it like your comment: empty(body('Get_items')?['value'] ==> did I make a mistake somewhere?

 

Or is there another solution for this?

 

Furthermore if I for example change the condition to if dynamic data (documentID) is not equal to null, it tells me still DocumentID column cannot be found

 

Thank you in advance!

Best regards,

Laura

Hey @Anonymous 

1st part of the expression:

A.png

2nd part

B.png

HTH

Jay

Anonymous
Not applicable

Hi @Jay-Encodian 

 

I have made the flow as you have demonstrated but I still notice the following errors.

The condition action always returns as false and also an item is not created in the list, the list stays empty.

 

Any suggestions? Thanks in advance!

 

Capture+656.PNGCapture5424.PNG

 

Anonymous
Not applicable

@Jay-Encodian 

So I have been able to make it create items using file name with extension as dynamic data instead of Title.

However,  if I edit the properties it keeps creating a new item in the list, so it is not picking up on the ID.

 

Best regards,
Laura

@Anonymous 

Have you checked the 'Get Items' query result? The query attempts to retrieve an existing item where the 'Document ID' value in List B is equal to the 'ID' of the item in List A which triggered the Flow... if it doesn't find an existing item it will create a new one.

Is the query logic working for you?

Anonymous
Not applicable

Hi @Jay-Encodian 

 

I don't believe the same ID is been given to the file in get items and create item if not exisiting. However, as a novice I might be misreading. The fitler query says as input DocumentID q '51', while the condition/create item output the ID is 12.

 

Thanks for your help!

 

Capturea.PNGCaptureb.PNG

Hi @Anonymous 

First things first 🙂

Every item list item / document library in SharePoint has a column called 'ID'... this column stores a unique ID for every item added to the list and is sequential and unique... the first item added would have an 'ID' value of '1', the second '2' so on and so forth... lets say I delete the first item and then add a third item... the third items ID value would be '3'.

Considering the above;

You have two Lists; List A which is the source and List B the destination.

Your Flow is copying data from List A to List B... and logic had been added to check if an item has been previously copied, and it it has update it.

To do this we've added a 'Document ID' column to List B which stores the ID value of the correlating item in List A... this basically creates a one to one relationship.

To check if an item exists;  we query List B to ask whether it contains any items where the 'Document ID' field is equal to the triggered items 'ID' field.. if it does then update if not then we need to create a new item.

When you create a new item in List B... the ID value will be different to the 'Document ID' value as the 'ID' the unique ID for the list item and the 'Document ID' value is the ID Value of the List A item which you have added.

Does this make sense?

HTH

Jay

Anonymous
Not applicable

Hi @Jay-Encodian 

 

That makes sense, so it doesnt matter if lets say DocumentID for list A = same documentID for list B. As long as the flow looks if the documentID for list B already exists. But for some reason it doesn't recognise the documentID as being the same when I change the properties. 

 

So for example I update a file in list A, and the ID = 52 (same as when uploaded), but then in the flow it doesn't recognise it as being the same? Am I perhaps using the wrong dynamic data (from which action does the ID have to be in each step?)

 

Thanks for your help!

Best regards,

Laura

 

 

@Anonymous 

So you don't need a 'Document ID' column on List A, list B has the 'Document ID' column to allow you to store the correlating List A item ID value... for example:

List A Item ID = 10;

I add a new Item to List B and set the 'Document ID' to '10', the resulting List B's value could be:

ID = 8 (if there had already been 7 items added to the list)

Document ID = 10

Now, lets say the item in List A (ID = 10) is updated... this triggers the Flow (the trigger item will be ID='10')

You then query List B for any items where 'Document ID' is equal to '10'... which should return the item from List B with an ID of '8'.

Then when you either update or create a new item, make sure you always write the 'ID' value of the triggered action (The changed item in List A) in the 'Document ID' field of the updated field.

That should have you covered

HTH

Jay

Anonymous
Not applicable

Hi @Jay-Encodian 

 

I still can't get the flow to work and for some reason after it ran I cannot look into the details of the output of the create new item (see picture), so I can't see what the documentID is for list B.

 

So I use the action get items with as filterquery ID of the action when a file is created or modified (proprties only) in list A. Then the condition where in both create item and update item I use the ID dynamic data from the action 'when a file is created or modified'. So this should match no? As it would look at the DocumentID of list A to see if it already exists in the column DocumentID in list B.

 

I went to look in my list B and noticed that while the column claim amount ( a column I added) is filled out, the column DocumentID, which should contain the ID information of List A, does not contain anything. So I'm assuming this is where my problem is coming from. Also list B is not updating with new files even though it says the flow ran succesfully. I will try to do some more testing to see why it's not populating the column in List B.

 

Thanks for your help!

Best regards,

Laura

 

 

Capturec.PNG

@Anonymous 

Referring to the original Flow config... is your configured as follows?

1.png

 

Anonymous
Not applicable

Hi @Jay-Encodian 

 

Yes my flow is configured as on your picture with the exceptions that I added an extra column 'claim amount' so this is visible in the condition action as well and that I changed the dynamic data for title to file name with extension instead of title as when I used Title dynamic data nothing appeared.

When I test my condition output is always false as it doesn't find a match. 

But then I noticed the list also doesn't populate the DocumentID column for some reason, even though it populates the 'claim amount' column.

So it's never able to find a match, which of course makes the flow not work 🙂 Sorry for only noticing now.

However, I'm still confused as to why it's not populating the list or only partly.

Any idea?

 

Thanks in advance!

Best regards,

Laura

@Anonymous 

If the Document ID column is not populated with a value it suggests you're not passing the correct 'ID' field... you need to make sure you've selected the 'ID' column from the trigger action, can you check?

Anonymous
Not applicable

Hi @Jay-Encodian 

 

Yes I checked and it should be correct.

Now when testing, list B is just not populating at all, so not sure what's going wrong.

 

 

Helpful resources

Announcements

Calling all User Group Leaders and Super Users! Mark Your Calendars for the next Community Ambassador Call on May 9th!

This month's Community Ambassador call is on May 9th at 9a & 3p PDT. Please keep an eye out in your private messages and Teams channels for your invitation. There are lots of exciting updates coming to the Community, and we have some exclusive opportunities to share with you! As always, we'll also review regular updates for User Groups, Super Users, and share general information about what's going on in the Community.     Be sure to register & we hope to see all of you there!

April 2024 Community Newsletter

We're pleased to share the April Community Newsletter, where we highlight the latest news, product releases, upcoming events, and the amazing work of our outstanding Community members.   If you're new to the Community, please make sure to follow the latest News & Announcements and check out the Community on LinkedIn as well! It's the best way to stay up-to-date with all the news from across Microsoft Power Platform and beyond.    COMMUNITY HIGHLIGHTS   Check out the most active community members of the last month! These hardworking members are posting regularly, answering questions, kudos, and providing top solutions in their communities. We are so thankful for each of you--keep up the great work! If you hope to see your name here next month, follow these awesome community members to see what they do!   Power AppsPower AutomateCopilot StudioPower PagesWarrenBelzDeenujialexander2523ragavanrajanLaurensMManishSolankiMattJimisonLucas001AmikcapuanodanilostephenrobertOliverRodriguestimlAndrewJManikandanSFubarmmbr1606VishnuReddy1997theMacResolutionsVishalJhaveriVictorIvanidzejsrandhawahagrua33ikExpiscornovusFGuerrero1PowerAddictgulshankhuranaANBExpiscornovusprathyooSpongYeNived_Nambiardeeksha15795apangelesGochixgrantjenkinsvasu24Mfon   LATEST NEWS   Business Applications Launch Event - On Demand In case you missed the Business Applications Launch Event, you can now catch up on all the announcements and watch the entire event on-demand inside Charles Lamanna's latest cloud blog.   This is your one stop shop for all the latest Copilot features across Power Platform and #Dynamics365, including first-hand looks at how companies such as Lenovo, Sonepar, Ford Motor Company, Omnicom and more are using these new capabilities in transformative ways. Click the image below to watch today!   Power Platform Community Conference 2024 is here! It's time to look forward to the next installment of the Power Platform Community Conference, which takes place this year on 18-20th September 2024 at the MGM Grand in Las Vegas!   Come and be inspired by Microsoft senior thought leaders and the engineers behind the #PowerPlatform, with Charles Lamanna, Sangya Singh, Ryan Cunningham, Kim Manis, Nirav Shah, Omar Aftab and Leon Welicki already confirmed to speak. You'll also be able to learn from industry experts and Microsoft MVPs who are dedicated to bridging the gap between humanity and technology. These include the likes of Lisa Crosbie, Victor Dantas, Kristine Kolodziejski, David Yack, Daniel Christian, Miguel Félix, and Mats Necker, with many more to be announced over the coming weeks.   Click here to watch our brand-new sizzle reel for #PPCC24 or click the image below to find out more about registration. See you in Vegas!       Power Up Program Announces New Video-Based Learning Hear from Principal Program Manager, Dimpi Gandhi, to discover the latest enhancements to the Microsoft #PowerUpProgram. These include 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 image below to find out more!   UPCOMING EVENTS Microsoft Build - Seattle and Online - 21-23rd May 2024 Taking place on 21-23rd May 2024 both online and in Seattle, this is the perfect event to learn more about low code development, creating copilots, cloud platforms, and so much more to help you unleash the power of AI.   There's a serious wealth of talent speaking across the three days, including the likes of Satya Nadella, Amanda K. Silver, Scott Guthrie, Sarah Bird, Charles Lamanna, Miti J., Kevin Scott, Asha Sharma, Rajesh Jha, Arun Ulag, Clay Wesener, and many more.   And don't worry if you can't make it to Seattle, the event will be online and totally free to join. Click the image below to register for #MSBuild today!   European Collab Summit - Germany - 14-16th May 2024 The clock is counting down to the amazing European Collaboration Summit, which takes place in Germany May 14-16, 2024. #CollabSummit2024 is designed to provide cutting-edge insights and best practices into Power Platform, Microsoft 365, Teams, Viva, and so much more. There's a whole host of experts speakers across the three-day event, including the likes of Vesa Juvonen, Laurie Pottmeyer, Dan Holme, Mark Kashman, Dona Sarkar, Gavin Barron, Emily Mancini, Martina Grom, Ahmad Najjar, Liz Sundet, Nikki Chapple, Sara Fennah, Seb Matthews, Tobias Martin, Zoe Wilson, Fabian Williams, and many more.   Click the image below to find out more about #ECS2024 and register today!     Microsoft 365 & Power Platform Conference - Seattle - 3-7th June If you're looking to turbo boost your Power Platform skills this year, why not take a look at everything TechCon365 has to offer at the Seattle Convention Center on June 3-7, 2024.   This amazing 3-day conference (with 2 optional days of workshops) offers over 130 sessions across multiple tracks, alongside 25 workshops presented by Power Platform, Microsoft 365, Microsoft Teams, Viva, Azure, Copilot and AI experts. There's a great array of speakers, including the likes of Nirav Shah, Naomi Moneypenny, Jason Himmelstein, Heather Cook, Karuana Gatimu, Mark Kashman, Michelle Gilbert, Taiki Y., Kristi K., Nate Chamberlain, Julie Koesmarno, Daniel Glenn, Sarah Haase, Marc Windle, Amit Vasu, Joanne C Klein, Agnes Molnar, and many more.   Click the image below for more #Techcon365 intel and register today!     For more events, click the image below to visit the Microsoft Community Days website.      

Tuesday Tip | Update Your Community Profile Today!

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.   We're excited to announce that updating your community profile has never been easier! Keeping your profile up to date is essential for staying connected and engaged with the community.   Check out the following Support Articles with these topics: Accessing Your Community ProfileRetrieving Your Profile URLUpdating Your Community Profile Time ZoneChanging Your Community Profile Picture (Avatar)Setting Your Date Display Preferences Click on your community link for more information: Power Apps, Power Automate, Power Pages, Copilot Studio   Thank you for being an active part of our community. Your contributions make a difference! Best Regards, The Community Management Team

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  

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)

Users online (4,116)