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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

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

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,331)