iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hi,
We've looked at Dynamic Data Access with Query Descriptor, and we didn't find any filter that use strings or nulls, it's all numbers. Now, the reason why we noticed this is when using a FilterDescriptor with a string value or null, Crosslight converts string values without a valid qualifier, which violates OData specifications. The same is true when you specify null as a value, the result of the assigned value is blank. Now in order to workaround this, we needed to add quotes (') as qualifiers for strings (e.g. "'Beverages'") and pass a null value as string (e.g. "null"), instead of the actual null object. Surely the samples from your documentation will work because numbers when converted to OData specifications will be treated as is, but this is not the case for strings, dates, etc.
Is this how we should do this with Crosslight or is there a proper way of doing it that we might be missing? Please advise.
Hi Jimmy,You can uses ToQueryString which you can find in here: http://developer.intersoftsolutions.com/display/crosslight/OData+Support+Using+Query+DescriptorIt can convert QueryDescriptor to ODataQuery automatically including it's qualifier.
Here is my example i have String in my Search Parameter:string adasd = this.QueryDescriptor.ToQueryString<SearchParameter> ();this is the result:$filter=(startswith(PropertyType, 'Apartment') eq true and startswith(SubArea, '') eq true and startswith(Apartment, '') eq true and startswith(Area, '') eq true and startswith(City, '') eq true and startswith(Price, '') eq true and Bedroom eq 0)hope that'll helps!
So there are specific FilterOperators used for strings or nulls. Okay, I guess that answers the question then. But what about for dates... are there specific filter operators for them too? Where can I find these information where it can tell us which operators to use for which data types. We did used FilterOperator.IsEqualTo and FilterOperator.IsNotEqualTo for some strings or nulls because it should filter specifically equal values. Using starts with or ends with operators will also validate other records that we don't want to de displayed (e.g. if we want results for 'John', we only need records for John and not records for Johnny, Johnson, etc). Using starts with operator will basically include those records that we don't need, correct me if I'm wrong.
Thanks!
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname