Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Saturday, August 23, 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: Passing a variable to a group?
Adam Perry
Posts: 5
 
Passing a variable to a group?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Jun 08 9:43 AM
Is there a way to pass a variable to a group?

I need to build a query that selects data based on the result of a lookup from the USERPROFILE table. I can almost do what I want, but the query builder won't run a select statement in the "value" field unles the "IN" operator is used. I need to use a "CONTAINS" (LIKE) operator, because the field contains multiple, comma-separated values.

For example, I want to this:
Field Name: account.some_column
Operator: Contains
Value is: (select EMPLOYEENUMBER from USERPROFILE where USERID = :userid)

So, I'm wondering if I can define a value from the above select statement that I can use in query builder. Sage is telling me that I can't define custom literals, but can anyone think of another way? I don't want to have to manipulate the table data.
[Reply][Quote]
Phil Parkin
Posts: 819
Top 10 forum poster: 819 posts
 
Re: Passing a variable to a group?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Jun 08 6:24 PM
Excellent question - as you've found, it's not easy at all!

Not sure if this will work, but maybe you can try this approach:

Change your condition to be Fieldname: Account.AccountID
Operator: IN
Value:

(select a.AccountID from Account a where CharIndex(:UserID, a.Some_Column) > 0)

Two possible problems:
- Not sure whether :UserID works in a correlated subquery
- The SLX OLEDB provider may not recognise the CharIndex function

Good luck.
[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): 8/23/2025 10:41:15 PM