cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
EdHacker
Level: Powered On

GroupBy SharePoint Lookup Column missing

When I attempt to use the GroupBy function, all the Lookup columns from my SharePoint datasource are not available as ColumnNames.

 

Are there any workarounds?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: GroupBy SharePoint Lookup Column missing

Hey 

 

 

So if you want to get a lookup column, lets say just to show its value in a label, you have to use ThisItem.<LookupColumnName>.Value

 

Lookup columns are not the best to filter on, it is better to filter on normal text fields or ID's.

I don't have the time to simulate this issue sadly.

 

There is nothing wrong with lookup columns in SharePoint, they are just treated differently then normal text values.

Hope this helps a bit.

 

Kind regards

 

 

Tom

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!





7 REPLIES 7
Community Support Team
Community Support Team

Re: GroupBy SharePoint Lookup Column missing

Hi EdHacker,

 

May I know where did you try to use the GroupBy function on? Some screenshots of the app would help more.

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Super User
Super User

Re: GroupBy SharePoint Lookup Column missing

Hey @EdHacker

 

 

A look at your code would be nice to evaluate your problem more like @v-monli-msft already requested.

But what you do in a groupby function is:

 

GroupBy(<Datasource>,"<ColumnName>","<GroupName>")

where columname can be your lookupfield and the groupname you can choose freely.

 

Hope this helps a bit and if something is not clear get back to us.

 

Kind regards

 

 

Tom





Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!





EdHacker
Level: Powered On

Re: GroupBy SharePoint Lookup Column missing

 

Here is a view of the columns define in my sharepoint List called "Sample Tracking"

 

Columns
A column stores information about each item in the list. The following columns are currently available in this list:
Column (click to edit)	Type	Required
Title	Single line of text	
SampleID	Lookup	
Location	Lookup	
LocationSmiley Frustratedhelf	Lookup	
Location:Rack	Lookup	
Location:Box	Lookup	
Condition	Lookup	
Notes		Multiple lines of text	
Volume		Number	
VolumeUnits	Choice	
Move Date	Date and Time	
PreparedBy	Person or Group	
Modified	Date and Time	
Created		Date and Time	
Created By	Person or Group	
Modified By	Person or Group

 

When I attempt to Filter a Gallary with values from Sample Tracking the lookup fields are not showing up in th UI as ColumnNames.

 

 Filter(GroupBy('Sample Tracking',)

My only choices are:

 

"Created"

"ID"

"Modified"

"Move_x0020_Date"

"Notes"

"Title"

"Volume"

 

The missing lookup columns are:

 

SampleID

Location

LocationSmiley Frustratedhelf

Location:Rack

Location:Box

Condition

VolumeUnits

PreparedBy

 

When I insert a column name is "SampleID" and add a GroupColumn name.

 

 GroupBy('Sample Tracking',"SampleID","TrackingByLocation")

The error generated are:

 

The specified column 'SampleID' does not exists.

The function 'GroupBy' has some invalid agruments.

Super User
Super User

Re: GroupBy SharePoint Lookup Column missing

Hey  @EdHacker

 

 

You should put your Filter function in your GroupBy function instead maybe then you will be able to get SampleID.

 

Hope this helps you a bit

 

Kind regards

 

 

Tom





Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!





bfing
Level: Power Up

Re: GroupBy SharePoint Lookup Column missing

Was this question ever resolved?  I have a similar issue where it appears the lookup columns do not appear to be an option to group by. 

 

I have a nested filter function as well.  It was suggested that perhaps the location of the filter was causing the problem, but following that suggestion didn't change the result.  I tried simply removing the filter function to eliminate it as potential source of the error, but it made no difference - still not recognizing the lookup column. 

 

Is this an issue with using Sharepoint as the data source?  Or lookup columns in Sharepoint?  Or is there a solution?

 

Thanks,

Highlighted
Super User
Super User

Re: GroupBy SharePoint Lookup Column missing

Hey 

 

 

So if you want to get a lookup column, lets say just to show its value in a label, you have to use ThisItem.<LookupColumnName>.Value

 

Lookup columns are not the best to filter on, it is better to filter on normal text fields or ID's.

I don't have the time to simulate this issue sadly.

 

There is nothing wrong with lookup columns in SharePoint, they are just treated differently then normal text values.

Hope this helps a bit.

 

Kind regards

 

 

Tom

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!





235234535134123
Level: Powered On

Re: GroupBy SharePoint Lookup Column missing

ThisItem.<column_name>.Value will get the lookup column value. I don't see this a solution to the original question. What I understand is lookup column when used in GroupBy are not recognized. Which is exactly I am stuck at now.

I tried using the postfix Id (i.e.: ShopId for Shop column name that looks up to Shop list) which is my way to target lookup columns in MS Flow and REST calls but still no luck.