Re: How to iterate over all the records of a block in a trigger
Andreas Fromm <[email protected]>
| Newsgroups | gmane.comp.gnu.enterprise.general |
|---|---|
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Reinhard Mueller wrote: > Am Sonntag, den 21.08.2005, 17:00 +0200 schrieb Bajusz Tamás: > >> The correct syntax is: >> >> for record in myBlock.getResultSet(): if record['foo']: >> record['bar'] = 'baz' > > > Oh, yes, sorry. I probably shouldn't answer mails before breakfast > ;-) > > Thanks, Reinhard > > > ---------------------------------------------------------------------- > > > _______________________________________________ Gnue mailing list > [email protected] http://lists.gnu.org/mailman/listinfo/gnue After throwing away the distro-packaged versions of gnue-* and installing the newest releases from the original site, I can iterate over the records like described above. My problem now is that I can't access the fields of the record. As I can see from your example and from the source I should be able to get a value like rec.['fieldname'] but I just get a 'None' when trying this. I tried to get the all the fieldnames by rec.keys but I just get something about a "<bound method RecordSet.keys of <RecordSet for ...." Thanks, Andreas -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDCMxKUmBtSMq5cGURAmcnAJ4xMEkdv/M+YUKcqeFJzBs6fH9+RQCgofJq EzZedANMewXMzFM9cT93BsU= =p0lQ -----END PGP SIGNATURE-----