logo       

Re: Refreshing current record in a form (Feature request ?): msg#00005

Subject: Re: Refreshing current record in a form (Feature request ?)
On Monday 12 September 2005 17:40, Ernesto Revilla wrote:
> Good evening,
>
> Putting these fields into a separate subblock could do it, although I think
> it's not a very nice solution, because it's making the design more
> complicate.
>
> I would prefer to implement a refresh option which could be called from
> Python. (MS-Access has this.) Do I have a way the mark a record as "dirty",
> i.e. modified, from Python? Do I have a way to force a "save record"
> operation? This is because, the save record operation, does automatically
> re-read the record from the database. So all the infrastructure is present.

So if i've got this right, what you basically need is a "reloadRecord" 
operation

> Perhaps I would just need a python binding. (In this case, could you give
> me some tips (filenames) where to look for it?) I would try to send a
> patch.

Tricky, there isn't a simple binding to do that, but I can add it pretty 
quickly. Which version are you using?

>
> Best regards, Erny
>
> 2005/9/12, Mike Richardson 
> <mike-1gTsUfBLqWsG2Il/BtU0GPXRex20P6io@xxxxxxxxxxxxxxxx>:
> > On Tuesday 30 August 2005 15:40, Ernesto Revilla wrote:
> > > Hello.
> > >
> > > I have the typical parent-child form for invoices (or orders)
> >
> > introducing
> >
> > > article lines with quantity, price and total amount. At the bottom of
> >
> > the
> >
> > > form a box should display the total amount of the invoice. This is
> > > calculated using a trigger inside the postgresql database.
> > >
> > > There is no refresh operation I can call from python, in the post-sync
> > > event. I think that a requery operation won't do it, because it
> >
> > re-executes
> >
> > > the query for the main form, will reset the focus, eventually jump to
> > > another record and do a lot of extra work that I don't need. I just
> > > want
> >
> > to
> >
> > > re-read the data for the current record of the main form. (excactly the
> > > operation that is done after record insertion or update).
> > >
> > > How could this be accomplished ?
> >
> > My first thought would be, can you separate the total amount field out
> > into
> > another subblock with its own query, such that is shows the right value,
> > and
> > reload just that block when needed?
> >
> > The last resort, though, would be to do the right SQL query "by hand",
> > something like:
> >
> > def eventFunc (thing, ....) :
> >
> > import RekallPYDBI
> > c = RekallPYDBI.connect (thing, '').cursor()
> > c.execute ('select .......')
> > d = c.fetchone()
> > thing.getNamedCtrl('path/to/control').setValue(row, d[0])
> >
> > The total amoutn field would be named but not have an expression
> >
> > --
> > Regards
> > Mike
> >
> > http://www.rekallrevealed.org
> > *THE* GPL/Open Source database front end for Linux and Windows.

-- 
Regards
Mike

http://www.rekallrevealed.org
*THE* GPL/Open Source database front end for Linux and Windows.


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
web.pylons.gene...    hurd.l4/2002-10...    kernel.commits....    user-groups.lin...    yellowdog.gener...    java.drools.use...    security.openva...    package-managem...    linux.debian.us...    qnx.openqnx.dev...    genealogy.gramp...    file-systems.if...    voip.wengophone...    tex.context/200...    ietf.smime/2003...    audio.csound.de...    culture.region....    xfree86.devel/2...    mobile.kannel.u...    distributed.con...    education.engli...    org.user-groups...    bug-tracking.gn...    recreation.bicy...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe