Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Saturday, February 22, 2025 
 
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 - SalesLogix Scripting & Customization
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: Fill in certain checklistbox values by default
SLX_Novice
Posts: 246
 
Fill in certain checklistbox values by defaultYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 09 Nov 12 3:10 PM
fiogf49gjkf0d

Hi all.


SLX LAN v7.2.1


I have a checklistbox (checklistbox2) that gets populated by the values from a picklist. I want to be able to fill in the checkbox on certain values in that checklistbox. Let's say, fill in the checkbox for the values: UPS, FEDEX and DHL. There are many more options but I want those 3 to be filled in, the picklist will vary in data. Sometimes it will have 5 values, sometimes it will have 8 etc.


How can I do that? Thank you in advance!


Below is the code I use for populating the checklistbox:



 


<p>Dim objSLXDBjb

Dim objRSjb

Set objSLXDBjb = New SLX_DB

Set objRSjb = objSLXDBjb.GetNewRecordSet

objRSjb.Open "Select TEXT From sysdba.PICKLIST WHERE  (PICKLISTID = 'k6UJ9A0002ZU') ORDER BY TEXT", objSLXDBjb.Connection

Do While not objRSjb.EOF

  Checklistbox2.Items.add(objRSjb(0).Value & "")

  objRSjb.MoveNext

Loop


 


[Reply][Quote]
Thomas Aussem
Posts: 57
 
Re: Fill in certain checklistbox values by defaultYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 01 Feb 13 1:31 AM
fiogf49gjkf0d

Hi,


I suppose you have found the answer yourself, because the answer is in your code. If the data varies you have to vary your SQL statement depending on your requirement, e.g.:


Select TEXT From sysdba.PICKLIST WHERE  PICKLISTID IN ('k6UJ9A0002ZU', 'xxx', 'yyyy')
Select TEXT From sysdba.PICKLIST WHERE  (PICKLISTID = 'k6UJ9A0002ZU') AND TEXT IN ('a','b','c')


and so on.


Cheers,


Thomas

[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: Fill in certain checklistbox values by defaultYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 01 Feb 13 2:17 AM


Dim objSLXDBjb

Dim objRSjb

Dim itemPos

Dim val

Set objSLXDBjb = New SLX_DB

Set objRSjb = objSLXDBjb.GetNewRecordSet

objRSjb.Open "Select TEXT From sysdba.PICKLIST WHERE  (PICKLISTID = 'k6UJ9A0002ZU') ORDER BY TEXT", objSLXDBjb.Connection

Do While not objRSjb.EOF

val = objRSjb(0).Value & ""

  itemPos = Checklistbox2.Items.add(val)

If (val = "UPS" OR val ="FEDEX" OR val = "DHL") Then

Checklistbox2.Checked(itemPos) = True

End If

  objRSjb.MoveNext

Loop


[Reply][Quote]
SLX_Novice
Posts: 246
 
Re: Fill in certain checklistbox values by defaultYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 01 Feb 13 9:01 AM

Thanks!

[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 © 2025 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): 2/22/2025 3:36:29 PM