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: Dynamic loading of picklist
Venu Gopal Ragu
Posts: 11
 
Dynamic loading of picklistYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 12 Jun 06 8:24 AM
fiogf49gjkf0d
I am trying to convert the legacy script to VB script for dynamically loading the picklist values.

Can anyone help me with this, or let me know the alternative of the same
[Reply][Quote]
Ian Fitzpatrick
Posts: 146
 
Re: Dynamic loading of picklistYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 12 Jun 06 12:33 PM

pulmicort

pulmicort
fiogf49gjkf0d
I am looking to dynamically code picklist values in Legacy SalesLogix (v5.2) can you please post the code you are using in to do that in legacy?

Thank you,
Ian
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Dynamic loading of picklistYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 12 Jun 06 12:53 PM
fiogf49gjkf0d
It is an easy task since the Picklists are all exposed in the object model you don't even need to make a trip to the database.

This example places the Opportunity Status in a ComboBox:

Dim list
Dim i

Set list = Application.PickLists("Opportunity Status")
For i = 0 To list.Count - 1
ComboBox1.Items.Add list.Item(i).Text
Next
Set list = Nothing


Got it?
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Dynamic loading of picklistYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 12 Jun 06 1:02 PM

female viagra weed

viagra vs weed amergerzic.com
fiogf49gjkf0d
For legacy it would be something like this:

(This is mostly from memory so not 100% sure this will run )

Dim hnd As Long
Dim r As String
Dim listname As String
Dim sql As String

listname = "Opportunity Status"

sql = "select p1.text from picklist p1 left outer join picklist p2 " & _
"on (p1.picklistid = p2.itemid) where p2.picklistid = 'PICKLISTLIST' " & _
"and p2.text = '" & listname & "'"

hnd = DBOpenSql(sql, True)
r = DBMoveTo(hnd, "BOF")

WithObject "ComboBox1"
ListClear "Items"
While Not DBEOF(hnd)
ListAdd "Items", DBGetValue(hnd, "text")
r = DBMoveTo(hnd, "Next")
Wend
EndObject
DBClose hnd


Well, hopefully that works, but at least should give you a good place to start.
[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 7:47:29 PM