Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Monday, November 25, 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!
 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: Custom Advanced Lookup Result Groups.
Greg Mussitsch
Posts: 7
 
Custom Advanced Lookup Result Groups.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Apr 06 10:34 AM

medical abortion pill

how much does the abortion pill cost redirect
fiogf49gjkf0d
I'm trying to implement a custom advanced lookup that will act like the standard SLX advanced lookup. Here's a simple example to illustrate how I'm currently creating the group ('strSQL' is contructed based on the search criteria entered):

strSQL = "(Select ContactID From Contact Where LastName Like 'St%')"
strFirstID =

With Application.BasicFunctions
.CreateTempGroup "Contact", "", "ContactID", " IN ", strSQL, strFirstID
.SetCurrentClientGroup "Contact: "
End With

This works for simple SQL statements like the one above but for more complex SQL involving multiple tables & UNIONS it fails without generating a run-time error (the record specified by 'strFirstID' appears but the caption bar reads "no records" even though I know there are 3 results). I'd like the group I create to behave the same as the SLX groups that are created from SLX advanced lookups, so if the group is saved then selected in the future it remains accurate.

Does anyone know the best way to accomplish this or if it's even possible?

Thanks,
Greg
[Reply][Quote]
John Gundrum
Posts: 632
Top 10 forum poster: 632 posts
 
Re: Custom Advanced Lookup Result Groups.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 21 Apr 06 6:04 AM
fiogf49gjkf0d
Hmm, never created a temp group through code. Is there a way for you to create a group throught the Query Builder that does the same thing? If you can get it to work there then you can click the 'View SQL' button to copy the actual SQL it is using to get the results.

Hope this helps.
John G.
[Reply][Quote]
Dawn
Posts: 13
 
Re: Custom Advanced Lookup Result Groups.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 21 Apr 06 9:10 AM

bentelan fiale

bentelan a cosa serve topogroup.com
fiogf49gjkf0d
Greg,

The provider is fussy about unions. I did a bit of experimenting with the grid and a union statement and this is what I found:

This does not work through the provider:
dbGridTest.SQL = "Select ContactID from Contact Where LastName like 'A%' Union Select AccountID from Account Where Account like 'A%'"

It is a straight query with no alias table names.

BUT
dbGridTest.SQL = "Select ContactID from Contact A1 Where LastName like 'A%' Union Select AccountID from Account A1 Where Account like 'A%'"

When I alias the tables the same, the query works.

Hope this helps!

Dawn
[Reply][Quote]
Greg Mussitsch
Posts: 7
 
Re: Custom Advanced Lookup Result Groups.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 21 Apr 06 9:18 AM
fiogf49gjkf0d
Thanks John. I've decided to go back to the drawing board on this. I used your suggestion as a starting point and now seem to be on the right track.
[Reply][Quote]
Greg Mussitsch
Posts: 7
 
Re: Custom Advanced Lookup Result Groups.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 21 Apr 06 9:21 AM
fiogf49gjkf0d
Thanks Dawn - I'll try that out.
[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/25/2024 11:44:40 PM