Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Friday, November 22, 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 - Controls
Forum to discuss usage & tips for SalesLogix controls and other 3rd party ActiveX controls. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to Controls | New ThreadView:  Search:  
 Author  Thread: Choose PickListName at runtime?
Jason Bennett
Posts: 1
 
Choose PickListName at runtime?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 28 Apr 06 3:56 PM

plendil

plendil grtbilservice.se
fiogf49gjkf0d
Does anyone know a way to set the picklist for a picklist control in 6.2 at runtime? We use SLX across several business units and I'm updating some forms to be used by all users. Depending on the current user's business unit, I need to display a different picklist.

I've tried pklSpecialty.PickListName = "Specialty", but I get a 'type mismatch' error. I've also tried using the Application.PickLists object, but may not have the correct syntax.

In past versions, I've gotten around this by using two separate controls. I would then show the appropriate control for the user and hide the other. This is cumbersome, especially because this is done for multiple fields.

Thanks!!
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Choose PickListName at runtime?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 28 Apr 06 10:44 PM

how much is the abortion pill Ph

abortion pill side effects ph mehrimen.com abortion pill cost philippines

albuterol

otc inhaler for cough saveapanda.com
fiogf49gjkf0d
The PickListName property is an object property (Of type SlxPickListName - go figure). The object exposes a string property "Name". So to set the picklist at runtime you would do so as follows:

picklist1.PickListName.Name = "My Picklist"

-Ryan
[Reply][Quote]
Jeremy Brayton
Posts: 491
Top 10 forum poster: 491 posts
 
Re: Choose PickListName at runtime?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 29 Apr 06 4:35 AM

buy citalopram 20 mg online

buy citalopram online uk click here
fiogf49gjkf0d
Account Detail has a good example of a cascading picklist in the Type/SubType fields. When you select a type, the subtype picklist is chosen based on the results.

One thing it doesn't do by default is check to see if the picklist exists in the database before setting it. This negates the "picklist text must match item" or other picklist settings and allows the field to be freeform typed in (unless you set ReadOnly = true). If you're really strict about these fields as I am, you'd check to see if the picklist is valid before trying to set it. I personally loop through Application.PickList looking for the specific name. If found, set it otherwise do nothing since it's currently valid. I also then check the PickList.Text property against values in the picklist to see if after changing the picklist, the text needs to be cleared or if can be kept. You would think performance would be an issue when you both check every single picklist's name and then each value in that picklist before you're done setting it but it's neglegable. Application.* collections are surprisingly fast even when looping through the entire thing.
[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/22/2024 3:57:02 PM