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

Get Items Filter ODATA Query with special characters in column name

Hi

 

I have a Sharepoint List with a column with special characters in it, its called Öppen/Stängd (Open/Closed).

It's "Choice" type of column with three choices: Öppen, Stängd, Vilande (Open, Closed, Paused).

 

No matter how I try to format the ODATA Filter Query I just get errors. I found out the name from Column settings "url" in Sharepoint.

 

I have tried:

%D6ppen%2FSt%E4ngd eq 'Vilande' (results in "The $filter expression "%D6ppen%2FSt%E4ngd eq 'Vilande'" is not valid. Creating query failed."

_x00d6_ppen_x002f_St_x00e4_ngd eq 'Vilande' (results in Column '_x00d6_ppen_x002f_St_x00e4_ngd' does not exist. It may have been deleted by another user.)

[_x00d6_ppen_x002f_St_x00e4_ngd] eq 'Vilande' (results in The $filter expression "[_x00d6_ppen_x002f_St_x00e4_ngd] eq 'Vilande'" is not valid. Creating query failed.)

['_x00d6_ppen_x002f_St_x00e4_ngd'] eq 'Vilande' (results in The $filter expression "['_x00d6_ppen_x002f_St_x00e4_ngd'] eq 'Vilande'" is not valid. Creating query failed.)

 

So I have learned to always create columns without special characters and then renaming them, but unfortunatly this list includes to many records for me to delete the column and start over (although Im sure I could copy data from 

2 ACCEPTED SOLUTIONS

Accepted Solutions
ScottShearer
Super User III
Super User III

@Muster 

I have found that getting the internal column name from the URL in list settings doesn't always work.Try the following instead:

  1. Create a new Flow with a button and a get items action
  2. In your Get items action, set the top count to 1
  3. Run the Flow
  4. Click on the output of the Get items action in the run
  5. Find the reference to your column in the output - refer to the column in exactly the same way in your query

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

sudharsan1985
Super User
Super User

@Muster 

I used the same column name that you had mentioned and created the choice column and used the below ODATA filter query to get the items

OData__x00d6_ppen_x002f_St_x00e4_ngd eq 'Choice 1'

Please try it and let me know.

 

Hope it helps, please like it or mark it as a solution if it resolves your clarification or issue
-Sudharsan K...

View solution in original post

4 REPLIES 4
ScottShearer
Super User III
Super User III

@Muster 

I have found that getting the internal column name from the URL in list settings doesn't always work.Try the following instead:

  1. Create a new Flow with a button and a get items action
  2. In your Get items action, set the top count to 1
  3. Run the Flow
  4. Click on the output of the Get items action in the run
  5. Find the reference to your column in the output - refer to the column in exactly the same way in your query

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

sudharsan1985
Super User
Super User

@Muster 

I used the same column name that you had mentioned and created the choice column and used the below ODATA filter query to get the items

OData__x00d6_ppen_x002f_St_x00e4_ngd eq 'Choice 1'

Please try it and let me know.

 

Hope it helps, please like it or mark it as a solution if it resolves your clarification or issue
-Sudharsan K...

View solution in original post

This worked perfectly! Why is it that it needs the prefix "OData"?

sudharsan1985
Super User
Super User

Hi @Muster 

I am not sure why OData, but whenever you have field names with special characters try to run Get Items with the top 1 record, and from the JSON output you can clearly identify the column names that can be used in OData Query.

Hope it helps, please like it or mark it as a solution if it resolves your clarification or issue
-Sudharsan K...

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA 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

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

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Users online (41,745)