11/30/2024 5:35:29 AM
|
|
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.
|
|
|
|
ComboBox with Text and TextCode
Posted: 11 Jan 08 6:00 AM
|
hi,
i need a combobox with a text shown to user (e.g. "your option1" and an underlying textcode, e.g. "o1") - is this possible? if yes, how to fill the combobox and how to read the values?
i only saw the picklists having both values. the values are created dynamically - can i do this with a pick list? (kind of empty picklist with filled items during script execution)?
Thanks |
|
|
|
Re: ComboBox with Text and TextCode
Posted: 11 Jan 08 6:49 AM
|
i now did it with an empty picklist which will be emptied on init and then filled with the "add"-function. it works, but i noticed one thing: the new item was really in the picklist (architekt>manage pick lists) - i used the admin user. the question is: will this affect all users?
e.g. script of user 1 fills PL with "1,2", at same time script of user 2 fills it with "3,4" - will there be "1,2,3,4" for both of them in the PL? or does this not have any impact on other users? |
|
|
|
Re: ComboBox with Text and TextCode
Posted: 11 Jan 08 7:41 AM
|
hmm i used ryans idea in another thread to delete the contents of the pickist:
For i = 0 to List.Count - 1 list.Item(0).Delete Next
but this doenst seem to work fine, slx seems to mess up the pl. List.Count e.g. says after some inserts "3" but in fact there are 5 items in it. so .count and real content doesnt seem to match, after some deleting+adding the script crashes...
i have a bad feeling in manipulating picklists like this ... any suggestions? |
|
|
|
Re: ComboBox with Text and TextCode
Posted: 11 Jan 08 2:26 PM
|
I'm not sure I understand completely what you're trying to do.
Are you just wanting to allow the user to select a picklist value by text, but store the code instead of the text? If that is the case you just need to bind the right property of the picklist, i think it is called ItemCode, instead of the Text property.
Please explain more.
-Ryan |
|
|
|
Re: ComboBox with Text and TextCode
Posted: 14 Jan 08 1:29 AM
|
hi, yes i would like to have the user select a text and store the datavalue behind it (.Text and .Textcode). But my problem is, that this picklist has to be filled dynamically, based on the input in another input field.
so i first tried a combobox which can be easyly filled / emptied, but a combobox doesnt represent a value in 2 dimensions (text and code), there is just a text (and to let the user select between internal IDs is not an option).
so i thought i have to use a picklist, which can store data as text plus code. but i have problems in dynamically filling the picklist. filling works, but the list is not empty on a later time if i open the form again. so i wanted to empty it before filling data into - and this deletion doesn't work, slx seems to get confused with number of items in picklist (.count) and to user shown items (sometimes more than count says). that is my problem, hope i expressed it clearer now |
|
|
|
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!
|
|
|
|
|
|
|
|