Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Friday, June 20, 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: Legacy: Grid : dynamically set SQL to Grid
htet aung
Posts: 14
 
Legacy: Grid : dynamically set SQL to GridYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Nov 07 3:04 AM
I want to set grid sql on runtime,
coz i need to group some fields and reterive max field value.

this is modified sql
SELECT distinct A1.PRODUCTID, A1.ACTUALID, A2.SHORTDESCRIPTION A2_SHORTDESCRIPTION,A3.PRICE A3_PRICE
, A3.CURRENCY A3_CURRENCY, A2.LANG A2_LANG
FROM sysdba.PRODUCT A1
left JOIN (select productid,max(price)price,currency from sysdba.c_productprice group by productid,currency) A3 ON (A1.PRODUCTID=A3.PRODUCTID)
left JOIN sysdba.C_PRODUCT A2 ON (A1.PRODUCTID=A2.PRODUCTID)
WHERE (A2.LANG='e') AND (A3.CURRENCY='chf')
----
this is orginal sql
SELECT DISTINCT A1.PRODUCTID, A1.ACTUALID, A2.SHORTDESCRIPTION A2_SHORTDESCRIPTION, A3.PRICE A3_PRICE
, A3.CURRENCY A3_CURRENCY, A2.LANG A2_LANG
FROM sysdba.PRODUCT A1
INNER JOIN sysdba.C_PRODUCTPRICE A3 ON (A1.PRODUCTID=A3.PRODUCTID)
INNER JOIN sysdba.C_PRODUCT A2 ON (A1.PRODUCTID=A2.PRODUCTID)
WHERE (A2.LANG='e') AND (A3.CURRENCY='chf')

---
i hope somebody help me!
[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: Legacy: Grid : dynamically set SQL to GridYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 16 Nov 07 9:22 AM
Legacy, this is all that Grid Condition stuff right? Not conducive to complex SQL Statements......In days of old......I don't even think IN() clauses were supported that well.....but I'm old, memory is fading, and I need some beer.....

anyway.....

We used to run a massive series of SQL statements and come up with a list of ID fields for the Row ID's that the Grid was contingent upon.....

then we added a series of OR grid conditions to the grid itself....then refresh the grid.

SO (and no I don't remember the exact syntax)
QueryAddConditon Gridname, "PRODUCTID", "=", "pA2EK0000wererer", "OR"
QueryAddConditon Gridname, "PRODUCTID", "=", "pA2EK0000wererer", "OR"

etc.
[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: Legacy: Grid : dynamically set SQL to GridYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 16 Nov 07 6:21 PM
On the old Grids, if I am not mistaken, the IN clause was represented by the "Starting with" and "Contains" keyworks, but that may add "%" at the end and at the front accordingly.

What version is this being ran? I know it is a legacy view, but if this is being ran on 6.2.x or higher you may be able to use the Query Optimizer inside the SLX Profiler to alter the query.
[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/20/2025 11:02:03 PM