Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Friday, November 22, 2024 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Web Forums - SalesLogix Web Platform & Application Architect
Forum to discuss the use of the SalesLogix Web Platform, Client and Customer Portals, and the Application Architect (For version 7.2 and higher only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Web Platform & Application Architect | New ThreadView:  Search:  
 Author  Thread: [7.5.4 web] How to specify a DateTime in a Lookup PreFilter
Tim Zech
Posts: 40
 
[7.5.4 web] How to specify a DateTime in a Lookup PreFilterYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 01 Dec 17 11:21 AM

We need to prefilter our lookup by a certain date. I just don't know, how to write it out as a FilterValue.


LookupPreFilter filterEndDateSince = new LookupPreFilter();
filterEndDateSince.CondOperator = "Greater than or Equal";
filterEndDateSince.FilterValue = ???;
filterEndDateSince.LookupEntityName = "Sage.Entity.Interfaces.ILicenseOrder";
filterEndDateSince.PropertyName = "EndDate";
filterEndDateSince.PropertyType = "System.DateTime";

The actual date will be set dynamically, later. I've tried it with the following strings so far:



  • 2019-01-01T00:00:00Z (the lookup returns nothing)

  • 2019-01-01T00:00:00 (the lookup returns nothing)

  • 2019-01-01 (the lookup returns everything unfiltered)

  • 01.01.2019 (the lookup returns everything unfiltered)

  • 01.01.2019 00:00:00 (this is the format, how the DialogService shows me any Datetime? value; the lookup returns nothing)

  • @2019-01-01@ (the lookup returns everything unfiltered)

  • @2019-01-01T00:00:00@ (the lookup returns nothing)

  • @2019-01-01T00:00:00Z@ (the lookup returns nothing)

  • Thu Feb 28 00:00:00 UTC+0000 2019


So: how do you specify a datetime string for a lookup prefilter?


 

[Reply][Quote]
Tim Zech
Posts: 40
 
Re: [7.5.4 web] How to specify a DateTime in a Lookup PreFilterYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Dec 17 6:11 AM

The sames question applies to LookupPreFilters with a PropertyType of System.Boolean.


Since the SalesLogix data types are usually nullable like bool?, how do you correctly filter them, if the column in the database contains null? Should I initialize the whole column with 'F' and set the corresponding fields to a default value on creation or is there any hint on how to filter them correctly? Currently I'm trying to filter like this:


LookupPreFilter filterSalesOrderNotCreated = new LookupPreFilter();
filterSalesOrderNotCreated.CondOperator = "Not Equal to";
filterSalesOrderNotCreated.FilterValue = "True";
filterSalesOrderNotCreated.LookupEntityName = "Sage.Entity.Interfaces.ILicenseOrder";
filterSalesOrderNotCreated.PropertyName = "CreatedSalesorder";
filterSalesOrderNotCreated.PropertyType = "System.Boolean";

I'm going for not equal to true because I thought this includes being set to False or being set to null. But the resulting list will remain empty, altough there's no single LicenseOrder where the property is set to True.


So: how do you specify a LookupPreFilter filtering for nullable bools? Setting the PropertyType to System.Boolean? doesn't work either.

[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 11/22/2024 4:09:02 AM