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

Cant access all columns in a Document Library to create a lookup column in a Sharepoint List

I am trying to establish a relationship between a Document Library and a Sharepoint list using Lookup columns in the Sharepoint list. When I begin creating/formatting this lookup column, and select the Document Library as my source, I do not have access to all the possible choices for the columns to relate back to the Sharepoint list. For instance, I am looking to relate a choice column called "Document Type" in my Document Library to a Sharepoint list column that references what type of document was uploaded to the library. I dont see any settings that wouldnt allow for my lookup column to be related to the Document Library columns of interest. Is there a reason why I only have access to some of my Document Library columns for a new lookup column in my Sharepoint list?

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @kdallstream ,

It needs to be a Single Line of Text to be able to used in a Lookup.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

10 REPLIES 10
WarrenBelz
Super User
Super User

Hi @kdallstream ,

If that is the built-in column, then no , it is not available, however I would suggest you question your need to use SharePoint lookup columns at all in Power Apps - they will cause you a lot of unwanted (and unnecessary) issues - this blog of mine may assist.

You can simply do the lookup in Power Apps and if necessary write back to a Text field.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

kdallstream
Frequent Visitor

Hi @WarrenBelz. Im actually not trying to use this in Power Apps, rather just in Sharepoint. I have a file upload Flow that is initiated from my Power App that uploads files to the Document Library. I am trying to leverage some of the metadata from that Flow to show up in a separate SharePoint list. Essentially, it would be a document "tracker" that people could sort through to see which Projects have missing files that still need to be uploaded. My hope is to use a Patch function in the Power App and the file upload Flow function to also "paste" certain data points into my Sharepoint list, and then use lookup columns in that list to distinguish which type of document was uploaded. 

Hi @kdallstream ,

You could include the type in another column in the Library metadata (I do this with folder path to manage Delegation issues)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

kdallstream
Frequent Visitor

@WarrenBelz hmmm Im not sure what you mean by that....could you please explain? I am also not using any folders in my document library or sharepoint list 

Hi @kdallstream ,

I meant add a column to your document library and put in the type - that way the data is available for whatever you want to use it for.

kdallstream
Frequent Visitor

@WarrenBelz Ah yes, I already have that column existing in my Document Library. It is a choice column and one of the metadata fields I track when I upload a file through the Power App. That is why I am trying to leverage it against my new Sharepoint list. I am just unable to select that "document type" column as an option for the Lookup column reference in my Sharepoint list. 

Hi @kdallstream ,

It needs to be a Single Line of Text to be able to used in a Lookup.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

kdallstream
Frequent Visitor

@WarrenBelz Got it ok thank you!

kdallstream
Frequent Visitor

@WarrenBelz I am having issues creating that new column in the library to show the "text" value of the choice column. I have tried to use conditional formatting and JSON but am having no luck. Do you have any experience in showing the "selected value" of a choice column as a "single line of text" in another column? I would like to show the text value (e.g. the selected choice), and use that value against my SharePoint list using a Lookup column as I explained above. 

The following code bellow is what I have been working off of:

{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",

"elmType": "div",

"txtContent": "@currentField" }

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,174)