I have this working in another scenario where I pull a string value from a
parent form but can't seem to make it work from a temp query.
I'm wanting to set the position value in a drop down list based on a temp
query which is in my bizobj file.
def getLastBuilder(self):
crs = self.getTempCursor()
crs.execute("select id, buildername from builders order by id desc
limit 1")
ds = crs.getDataSet()
return ds
This successfully pulls the last builder added to the database with the
following dataset:
({'id': 189L, 'buildername': u'last database entry'},)
With this dataset I want to pull out just the buildername which in this case
is *last database entry* so that I can use that string in this function of
the main app form.
def refreshBuilders(self):
bizBuilders = self.Form.getBizobj("builders")
bizBuilders.requery()
lastBuilder = bizBuilders.getLastBuilder()
recordvalname = lastBuilder.getFieldVal("buildername")
print lastBuilder
pv = self.Form.ddBuilders.Choices.index(recordvalname)
dabo.ui.setAfter(self.Form.ddBuilders, "PositionValue", pv)
For the life of me I haven't been able to successfully pull just the string
I want from the dataset. I've hunted the forums and the api doc without
success.
Can anyone point me in the right direction?
Carey
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---
_______________________________________________
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]