11/22/2024 10:51:44 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.
|
|
|
|
How to get the ItemID for a picklist at runtime?
Posted: 01 Sep 06 3:09 PM
|
fiogf49gjkf0d Hello,
I need to save the text typed into a textbox to the picklist, which is bounded to this textbox. I know user can "Add" a new item through the picklist, but how to add a new item to the picklist when the user typed into the textbox without "Add" through the picklist?
If I need to insert the data into the picklist table by programming, how to get the "ItemID" for the new item, in order to save the record to the picklist table? and how to refresh the picklist so that user can see the changes in the picklist?
Any code examples? Please help.
Thank you very much in advance |
|
|
|
Re: How to get the ItemID for a picklist at runtime?
Posted: 06 Sep 06 12:03 PM
|
fiogf49gjkf0d Mary,
Although I haven't tried it, this may work for you. Also, the Item Index may require an integer.
Call Application.PickLists.Item("PicklistName").Add("Text", "ShortText")
~JC
|
|
|
|
Re: How to get the ItemID for a picklist at runtime?
Posted: 06 Sep 06 3:15 PM
|
fiogf49gjkf0d Thank you for your reply. But there is no "Add" method exists in this "Application.PickLists.Item("PicklistName") object.
Also I need to retrieve the ItemID first as I think the ItemID is the unique ID for the Item added into the "Picklist" table. Any ideas?
Thanks, |
|
|
|
Re: How to get the ItemID for a picklist at runtime?
Posted: 06 Sep 06 4:36 PM
|
fiogf49gjkf0d Mary,
Type in...
Application.PickLists.Item.
and you will get the drop down with the add method. Once you append the add method, you can go back and back fill the Item Index. It's just the way SLX type ahead works.
---------------------------------------------------------------------------
This statment will get you all information you need for the top level picklist. (A1.Text is the name of your picklist.)
SELECT A1.* FROM sysdba.Picklist A1 WHERE (A1.Text = '') AND (A1.PickListID = 'PICKLISTLIST')
This statment will get you all the items contained in that picklist. (A1.Text is the name of your picklist.)
SELECT A2.* FROM sysdba.Picklist A1 INNER JOIN sysdba.Picklist A2 ON (A1.ItemID = A2.PicklistID) WHERE (A1.Text = '') AND (A1.PickListID = 'PICKLISTLIST')
~JC |
|
|
| |
|
Re: How to get the ItemID for a picklist at runtime?
Posted: 07 Sep 06 10:41 AM
|
fiogf49gjkf0d Mary,
I'm sorry, but I do not have the version 6.1 software or documentation to review. Although, you should really consider moving to version 6.2 or higher. If I'm not mistaken, version 6.2 was the one that made the major revision to the SLX provider, which significantly improved the LAN client performance.
However, if you are not able to find a built in function to update the picklists, you can always just insert a row into the picklist table. Although, keep in mind that in order to refresh the picklist cache to show the inserted row, you will need to do a Ctrl+F5 to refresh the client after the insert. You can use the second SQL statement I posted to determine how the next row insert should be formatted.
~JC |
|
|
| |
|
Re: How to get the ItemID for a picklist at runtime?
Posted: 08 Sep 06 1:13 PM
|
fiogf49gjkf0d Hello,
I don't know why my version(6.1.1.1018) doesn't have this built in function. I can only see the following methods/properties only; Application.PickLists.Item("my picklist name") .AllowEdit .Count .DefaultItem .Fixed .ID .Item .ItembyShortText(value) ...
There is no Add method at all .... Application.PickLists.Count Application.PickLists.Manage Application.PickLists.Select
Now I don't want to spend so much time on this non-exist function. I want to use SQL insert statement to update the picklist table with the new values user entered into the text box.
Insert picklist (ID, TEXT, SHORTTEXT, ITEMID, PICKLISTID, USERID, DEFAULTINDEX) VALUES('55','MYTEXT','SHORTTEXT','ITEMID','MYPICKLISTID','ADMIN',NULL)
I noticed that the ItemID in "Picklist" table is generated by SalesLogix internally and should be unique. Can you tell how to generate/get this ItemID (Saleslogix ID) so I can insert this value into the table? Can I call slx_DBIDs Saleslogix Stored Procedure to get the request SalesLogix ID for this table? But the example is in SLXSDN. Where can I find SLXSDN?
And I also noticed that Add a new item into the picklist, that item will be only available to that user, other users wont see the items that other users entered, unless, the item entered by "Admin" - will be available to everyone.
Any ideas? Thank you very much for all your responses.
|
|
|
| |
|
Re: How to get the ItemID for a picklist at runtime?
Posted: 14 Sep 06 1:42 PM
|
fiogf49gjkf0d Hello,
Dose any one know how to call or use "slx_DBIDs" stored procedure in Saleslogix 6.1? Is this ID generated by this "slx_DBIDs" stored procedure will be the new ItemID in the Picklist table? Please help.
Thanks, |
|
|
| |
| |
|
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!
|
|
|
|
|
|
|
|