Paul McNett wrote:
> Paul McNary wrote:
>> 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)
> 
> Define a local biz reference first to avoid writing 
> 'self.Form.getBizobj..." over and over. IOW:
> 
> biz = self.Form.getBizobj("public.alchemy_generic_product")
> biz.setWhereClause("name like '%%%s%%'" % self.Value)
> biz.setOrderByClause("name")
> dsGenericProduct = biz.getDataSet(flds=("genericproductid", "name"),
>     rows=10)
> 
> 
> print dsGenericProduct
> 
>> 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.
> 
> Looks like you have that syntax correct, but you've never requeried the 
> bizobj after setting the where clause and order clause. IOW, you need a:
> 
> self.Form.requery("public.alchemy_generic_product")
> 
> before calling getDataSet()
> 
> HTH
> Paul
> 
> 
> 

Thanks

Paul

I knew it should be something simple.

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