11/22/2024 3:56:40 PM
|
|
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!
Forum to discuss usage & tips for SalesLogix controls and other 3rd party ActiveX controls. View the code of conduct for posting guidelines.
|
|
|
|
Choose PickListName at runtime?
Posted: 28 Apr 06 3:56 PM
|
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!! |
|
|
|
Re: Choose PickListName at runtime?
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 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 |
|
|
|
Re: Choose PickListName at runtime?
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. |
|
|
|
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!
|
|
|
|
|
|
|
|