Re: Fill wirh a script
- From: Murray Cumming <murrayc murrayc com>
- To: Federico Munerotto <mune72 tiscali it>
- Cc: glom-devel-list gnome org
- Subject: Re: Fill wirh a script
- Date: Thu, 18 Oct 2007 14:24:30 +0200
On Wed, 2007-10-17 at 18:42 +0200, Federico Munerotto wrote:
On mer, 2007-10-17 at 16:20 +0200, Murray Cumming wrote:
I seem to have the same problem here. I am investigating.
Note, however, that if your calculation is really this simple, it's
easier just to add the related field directly to the layout without
adding a new field to the table. You can choose the relationship at
the
top of the dialog when you add a field to the layout.
You could investigate with all the time you need as I found a conceptual
error and I am starting over from the beginning.
I am proud to let you discover a bug and my congratulations for the
entire application.
I figured it out. I should have seen it immediately.
The calculation (the implementation of a python function) needs a
return. So it should be
return record.related["produca"]["comments"]
instead of just
record.related["produca"]["comments"]
I'm not sure when python needs the return and when it just uses the
last-evaluated value. Maybe there is something that I can do to make it
work without the "return".
Also make sure that the field has the correct type: You will not get
good results if you used a numeric field for this example, for instance.
--
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]