Hello

I need some syntax help with getDataSet for a bizObj

I have a section of code:

self.Form.getBizobj("public.alchemy_generic_product").setWhereClause("name 
like '%%%s%%'" % self.Value)
         
self.Form.getBizobj("public.alchemy_generic_product").setOrderByClause("name")
                dsGenericProduct = 
self.Form.getBizobj("public.alchemy_generic_product").getDataSet(flds=("genericproductid",
 
"name"), rows=10)


                print dsGenericProduct


                self.Form.lstbxGenericName.Keys, 
self.Form.lstbxGenericName.Choices  = 
self.Form.getBizobj("public.alchemy_generic_product").getDataSet(flds=('genericproductid',
 
'name'), rows=10)


                #cursorGeneric = self.Form.PrimaryBizobj.getTempCursor()
                # cursorGeneric.execute('select genericproductid, name from 
alchemy_generic_product order by name')

                # dsGeneric = cursorGeneric.getDataSet()

                # self.Form.lstbxGenericName.Choices = [rec['name'] for rec in 
dsGeneric]

                # self.Form.lstbxGenericName.Keys = [rec['genericproductid'] 
for rec 
in dsGeneric]

                self.Form.lstbxGenericName.refresh()

I've tried to add extra lines between real lines to help show the code 
lines.

I am misunderstanding how to use the: 
getDataSet(flds=("genericproductid", "name"), rows=10)

I assumed that would return 10 rows in a dataset based on the bizObj
"public.alchemy_generic_product"
with just columns genericproductid and name.

print dsGenericProduct shows an empty dataset.

Thanks

Paul McNary
[EMAIL PROTECTED]



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]

Reply via email to