cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
martinav
Super User
Super User

How to do a contains() in a sharepoint ODATA search?

Pretty simple.  I need to do this:

 

martinav_0-1651529626522.png

apparently contains() is not allowed.  Please advise!

 

1 ACCEPTED SOLUTION

Accepted Solutions

Actually this was my mistake.  I meant to do an SQL get rows, and the contains() statement works fine.

View solution in original post

6 REPLIES 6
Expiscornovus
Super User
Super User

Hi @martinav,

 

As a workaround can you try the substringof function 

substringof('your dynamic content value',SN_List)

 

@Expiscornovus ,

 

Hmm, its a good try.  However, seems my SQL column is 'multi-row' text which is a 'NOTE' in odata.  I copied the table, then changed to column from 'text' to a 'varchar(MAX)' and same error occurs.  It still sees it as a 'NOTE'.  I'm not sure how to make sure this is a single string.  It can be a very long field, but there is no reason for it to be multi-line.  Any idea about this?  How do I convert it, and not wipe out the contents of the column?

 

The field 'SN_List' of type 'Note' cannot be used in the query filter expression.

martinav
Super User
Super User

SN_List is a continual string.  Its not telling the truth.  Not sure where to go from here.

Actually this was my mistake.  I meant to do an SQL get rows, and the contains() statement works fine.

Expiscornovus
Super User
Super User

Hi @martinav,

 

I didn't even think of asking that. I assumed that you were trying to collect SharePoint data. Glad you figured it out yourself and to see the contains actually works in the SQL - get rows action 🙂

martinav
Super User
Super User

@Expiscornovus ,

 

You were absolutely correct, and it wasnt an assumption, because I had a Get Rows SP action in my initial post.  Ooops.  Totally wrong action and wrong dataset.  I dont know what I was thinking.  Duhhhh

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events happening this month - don't miss out!

 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (3,315)