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
New Contributor
rsmerker
Posts: 9
Registered: ‎03-05-2011
My Device: 9800
Accepted Solution

Date FilterExpressions not working with Appointment.find on OS6

I am unable to get the Date comparisons to work correctly for FilterExpressions when consumed by a blackberry.pim.Appointment.find() on any OS 6 Device.  They just dont work.  Here is the code, taken nearly exactly from the API samples :

 

 

var date = new Date();
var filter = new blackberry.find.FilterExpression("start", ">=", date);
var appts = blackberry.pim.Appointment.find(filter);

 

 

This code will never find an appointment, but you take off the comparison, or negate it, and it finds them.  OS 5 works great.  Can anyone confirm that, or better yet have any workarounds?   Thanks!

 

 

Please use plain text.
New Contributor
yoohoo
Posts: 5
Registered: ‎02-25-2011
My Device: 9810

Re: Date FilterExpressions not working with Appointment.find on OS6

I have exactly the same problem too. What gives???

 

All this time I thought I was crazy and smoking something (I was I was)

Please use plain text.
New Contributor
rsmerker
Posts: 9
Registered: ‎03-05-2011
My Device: 9800

Re: Date FilterExpressions not working with Appointment.find on OS6

I am glad I am not alone.  It is a bit painful to deal with, right now I have to basically give it a filter to return everything, then iterate through the whole set to find the items I need, which isnt efficient.

 

Can anyone else state thier experience with this?  I dont see it as a known problem that is being worked, so I dont have faith that it would be fixed in the upcoming Webworks release....

 

I suppose we should just take this to our corporate RIM rep, or open a ticket......

Please use plain text.
New Contributor
yoohoo
Posts: 5
Registered: ‎02-25-2011
My Device: 9810

Re: Date FilterExpressions not working with Appointment.find on OS6

Just talked to a Rep and they will have a new release out with WebWorks very soon. The fix that we're both looking for is in there.

Please use plain text.
New Contributor
rsmerker
Posts: 9
Registered: ‎03-05-2011
My Device: 9800

Re: Date FilterExpressions not working with Appointment.find on OS6

Nothing as of yet - the new Tablet Webworks API is out, but nothing on the Smartphone one.  Anyone have even a workaround for this that doesnt involve manually parsing the array?  We have an app that blows up if people have a large number of appointments because we have to load them all into a Javascript array and parse them....

Please use plain text.
New Contributor
rsmerker
Posts: 9
Registered: ‎03-05-2011
My Device: 9800

Re: Date FilterExpressions not working with Appointment.find on OS6

This problem is fixed with the Webworks 2.0 API for Smartphones - Filter works like a champ!

Please use plain text.