Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Thursday, June 19, 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: Changing Picklist
Jason Rainbird
Posts: 9
 
Changing PicklistYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 Sep 06 9:59 AM
fiogf49gjkf0d
Is there anyway I can change the picklist for the State field based upon the Country?

As an example if the Country is USA I want the Picklist to be State however if it's United Kingdom, I want the picklist to be County.

Cheers
[Reply][Quote]
Jeremy Brayton
Posts: 491
Top 10 forum poster: 491 posts
 
Re: Changing PicklistYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 Sep 06 11:32 AM
fiogf49gjkf0d
Are you on 6.x? If so, check out how SalesLogix does something similar on the Account Detail screen. When you select a type, a subtype picklist is chosen based on a basic naming convention. Look at the code in the routine pklTypeChange and it'll have everything you need.

What's cool about their technique is if you add an entry to the type picklist, all you have to do is create a subtype picklist using the naming convention and the routine automatically works. This keeps you out of Architect when you're making minor data changes and is something I've learned to strive for in my own customizations.
[Reply][Quote]
Marc Johnson
Posts: 252
 
Re: Changing PicklistYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 26 Jun 07 10:29 AM
Ok I'm feeling very dumb today. I know I've done this in the past but I can't for the life of me get this to work.

Here is the code suggested:
If pklSubType.PickListName.Name <> Application.Translator.Localize("Account") & " " & pklType.Text Then 'DNL
pklSubType.PickListName.Name = Application.Translator.Localize("Account") & " " & pklType.Text 'DNL
If ErrorCheck (Application.Translator.Localize("Error accessing Subtype:")) > 0 Then exit sub
pklSubType.Text = ""
End If

What should my subtype picklist name be? The same as the type? So if Type = Customer, then the picklist should be "Customer"?

EDIT: The part, Application.Translator.Localize("Account"), adds Account to the beginning (duh on me). So the picklist would be Account Customer.
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Changing PicklistYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 26 Jun 07 11:40 AM
Hi Jason,

You'd basically do something along these lines. We'll assume the country picklist control is named "pklCountry" and the state picklist control is named "pklState":

If UCase(pklCountry.Text) = "USA" Then
pklState.PicklistName.Name = "State"
Else
pklState.Picklist.Name.Name = "County"
End If


Make sense?

-Ryan
[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/19/2025 4:59:42 AM