Quantcast
Channel: SCN : Discussion List - PowerBuilder Developer Center
Viewing all articles
Browse latest Browse all 2881

How to pass data from ListBox as parameter (Allow multi select)

$
0
0

Hi All,

 

My program has a listbox, which allows user to do single or multiselect and selection is from datawindow, code as below:

 

----------------

dw_stockclass.SetTransObject(SQLCA)

ll_rowmax = dw_stockclass.retrieve()

 

 

FOR ll_c = 1 to ll_rowmax

  ls_temp = string(dw_stockclass.object.code[ll_c])+' - '+dw_stockclass.object.descr[ll_c] +'                             '+ string(dw_stockclass.object.stockclassid[ll_c])

  lb_stockclass.InsertItem(ls_temp, 0)

NEXT

--------------------

 

 

Fyi, I have IN query in datawindow's datasource to cater multiselect data, as following, and ls:stockclassid is an string array:

 

----------------

.............

 

WHERE ( sparetype.parttypeid = spareunit.parttypeid )

and ( stockclass.stockclassid IN ( :ls_stockclassid_list ))

 

-----------------

 

 

My question is, how to pass dw_stockclass.object.stockclassid as parameter (single or multiple data) into datawindow for data retrieval. Example as below:

 

dw_1.SetTransObject(SQLCA)

dw_1.SetSort ( Sorting_Parm)

dw_1.Retrieve(InstCode, StockClassid_List)

 

 

Please advise and provide some sample code for reference if possible.

Thank you in advance.

 

BR,

Yow


Viewing all articles
Browse latest Browse all 2881

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>