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!
|
|
Dynamic Picklist
Posted: 16 Aug 10 10:56 PM
|
I know that we can have a picklist name that drives off another picklist selection. Been there... done that... for years! For example, when the user picks the Account Type field, we have the Account SubType field load the appropriate picklist.
However, we now have a new scenario where the business users want to have the Account Type field set to Multiselect, which messes the SubType up. For example, if the user selects "Dealer" and "Vendor" from the Account Type (it displays in the field as Dealer, Vendor, the code only picks up the "Dealer" Subtype picklist.
How can I build a dynamic picklist based on values set on the Account SubType. Ideally my thought is that when they do the Multi select, to have a Picklist called "AccountSubDynamic" and just build the picklist on the fly, instead of just setting the PicklistName property to this. However, I can't find where to dynamically add and remove items such we do in .NET listboxes.
Thanks for the help in advance. |
|
|
|
Re: Dynamic Picklist
Posted: 17 Aug 10 2:46 AM
|
I assume you're talking SLX LAN. I would forget all about pick lists for this problem and instead build a dynamic combo box, populated on the 'on change' event of the primary pick list via some SQL on the PICKLIST table itself. |
|
|
|
Re: Dynamic Picklist
Posted: 17 Aug 10 2:28 PM
|
Hi Phil,
Unforunately, the client really likes the picklists, and they want to multiselect the Subtypes too. Do you know how to create a dynamic picklist???
Any help is greatly appreciated.
Thanks! |
|
|
|
Re: Dynamic Picklist
Posted: 17 Aug 10 2:28 PM
|
Hi Phil,
Unforunately, the client really likes the picklists, and they want to multiselect the Subtypes too. Do you know how to create a dynamic picklist???
Any help is greatly appreciated.
Thanks! |
|
|
|
Re: Dynamic Picklist
Posted: 17 Aug 10 2:58 PM
|
Not really - you are bending the capabilities just a little too much. As far as I know, you cannot adjust pick list items in memory, which is what you need (and which is why I suggested a combo box). You could be brutal about it and physically modify the pick list items, as stored on disk. But then what happens if someone else tries? Eek!
|
|
|
|
Re: Dynamic Picklist
Posted: 17 Aug 10 8:52 PM
|
I agree with Phil, SalesLogix typically caches Picklists when the Client Start, so you won't be able to do so by changing values on the Table. You might want to use a List Box with MultiSelect enabled (you would have to figure out the Selected values on Show and on Save.
|
|
|
|
Re: Dynamic Picklist
Posted: 18 Aug 10 3:28 AM
|
Provided you are on SLX 7.5.x you *can* modify the picklists dynamically using the .Save method - not sure if this helps anyone or just adds to confusion ?!
Application.Picklists.Item(ix).Add
You must use .Save to commit the changes/refresh cache.
Regards Mike
|
|
|
|
Re: Dynamic Picklist
Posted: 18 Aug 10 10:13 AM
|
Do we still have the issue where 50+ users are on the LAN, you update the Picklist Collection and ONLY those users that have hit Ctrl-F5 after that .Save has occurred see the new value in the picklist? Or is SLX automagically refreshing all\each LAN user's Picklist Collection? |
|
|
| |
|