SDK - $filter where string contains 'xxxxxx' (complex types)

This thread is now closed to new comments.
Some of the links provided in this thread may no longer be available or relevant.
If you have a question please start a new post.
1 REPLY 1
Former Staff KeranM
231 Posts
Former Staff
Australia
KeranM
Former Staff

299Posts

94Kudos

56Solutions

Accepted Solution Solved

Re: SDK - $filter where string contains 'xxxxxx' (complex types)

Morning

 

To do this with the version of oData we use (v3) you can call substringof on a specific field 

 

substringof('Sale', Description) eq true

 This one finds the term SALE anywhere within the Description field.

 

You can find more details on this oData page for version 3

 

Try this with your dataset

$filter=DateOccurred ge datetime'2015-01-01' and DateOccurred le datetime'2015-03-31' and substringof('USB D', Memo) eq true

 Note that using this the content substringof looks for is case sensitive.

 

Hope that helps

Keran McKenzie
Futurist in residence @MYOB

Are you a developer? Check out http://developer.myob.com
Looking for an Add-on? Check out http://myob.com/addons/

Twitter: @myobapi | @keranm
Highlighted
Contributing Partner David_Stringer
1 Post
Contributing Partner
Australia
David_Stringer
Contributing Partner

5Posts

0Kudos

0Solutions

Solved: Go to Solution

SDK - $filter where string contains 'xxxxxx' (complex types)

Hi All

 

I am trying to find the correct way (if any) to retreive general journals between 2 dates where the memo field contains a certain string.

 

Here is my attempt at the filter string part ....

 

$filter=DateOccurred ge datetime'2015-01-1' and DateOccurred le datetime'2015-03-31T23:59:59' and contains(Memo, 'USB D') 

 

Can you tell me if this is possible and if so, the right way to do it.

Thanks in advance.

David Stringer
A.S.K Stringer
Didn't find your answer here?
Try using advanced search to find a post more easily Advanced Search
or
Get the conversation started and make a new post Start a Post