Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Developer
Posts: 314
Registered: ‎03-28-2012
My Device: Curve 9360, Playbook, BB10 Dev Alpha
My Carrier: TMN

Bug in Memo.find?

Hi everyone,

 

I'm using very simple code, and it seems the problem is really not on my side.

For what I can see, the Memo.Find function does not search by title.

Any filterexpression that includes title as the term, results in 0 finds.

 

you can try the code below



var memo = new blackberry.pim.Memo();
memo.title = "abc";
memo.save();

var filter = new blackberry.find.FilterExpression("title","CONTAINS","abc");
var r = blackberry.pim.Memo.find(filter);
alert(r.length)

 

the result is zero.

however, if I search by uid (or notes), and then try to access the 'title' value on the result, it works fine.

Nuno
Developer
Posts: 314
Registered: ‎03-28-2012
My Device: Curve 9360, Playbook, BB10 Dev Alpha
My Carrier: TMN

Re: Bug in Memo.find?

anyone? Smiley Sad

Nuno
Developer
Posts: 314
Registered: ‎03-28-2012
My Device: Curve 9360, Playbook, BB10 Dev Alpha
My Carrier: TMN

Re: Bug in Memo.find?

Problem solved! 

I assumed that "CONTAINS" would behave like a SQL "%LIKE%". I was wrong.

Using a REGEX it works perfectly.

Nuno