Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Wednesday, June 18, 2025 
 
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!
 Architect Forums - SalesLogix Scripting & Customization
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: SELECT CASE expression in datagrid
Adam Conde
Posts: 14
 
SELECT CASE expression in datagridYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 May 07 1:39 PM
fiogf49gjkf0d
Is it possible to create a datagrid that uses a CASE expression in the SQL statement? I am not having any luck getting it to work.

My SQL starts like this:

datagrid1.sql.text = "select 'CONDITIONAL' = case when (d.FIELD_A is null or d.FIELD_A like '') then 'F' Else 'T' end, d.OPPORTUNITYID, ... "

The query works fine when run within SQL, but when I try to build the datagrid within SalesLogix it thows an error saying that it "Failed to parse SQL".
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: SELECT CASE expression in datagridYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 May 07 1:56 PM
fiogf49gjkf0d
switch it around to alias the value at the end. For example, this is valid:

select accountid, case when type = 'Customer' then '$$$$$' else type end as newtype from account

Make sense? Do you see the difference?
[Reply][Quote]
Adam Conde
Posts: 14
 
Re: SELECT CASE expression in datagridYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 May 07 2:00 PM
fiogf49gjkf0d
That did the trick. Thanks for your help!
[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 © 2025 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): 6/18/2025 8:54:34 AM