Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Refreshing forms from the table.

3 views
Skip to first unread message

arnam

unread,
Feb 9, 2010, 4:55:05 AM2/9/10
to
Hi,

In the method modifiedField my code modifies fields from the table
(lines of the document) and a fields in another table (document
header). (Tables are associated with foreign key)

How to call a refresh on the form, from the code that is implemented
on the table? Few diffrent forms may use these tables, so I wan't to
refresh them all.

Sorry for bad english.

Regards
Peter

Martin Drab

unread,
Feb 9, 2010, 6:25:01 AM2/9/10
to
In general, you can call something like this:

if (table.isFormDataSource())
{
table.dataSource().refresh();
}

But you shouldn't save a record in the modifiedField(). Use this method only
for an initialization of fields. Simply set values to the "this" buffer (e.g.
this.Field1 = '') and no refresh is needed.
Also, you should update other tables during a record saving - e.g. in the
insert() method.
--
Best regards,
Martin Drab (Czech Blog: http://dax-cz.blogspot.com)


"arnam" wrote:

> .
>

arnam

unread,
Feb 9, 2010, 7:00:59 AM2/9/10
to
W dniu 2010-02-09 12:25, Martin Drab pisze:

> In general, you can call something like this:
>
> if (table.isFormDataSource())
> {
> table.dataSource().refresh();
> }
>
> But you shouldn't save a record in the modifiedField().

On the first table (lines of document), from which modifiedField() is
executed I use "this" buffer, but related table (header of document)
is modified using 'select forUpdate' clause. So first table has
relation to dataSource, but second table doesn't (dataSource() is
nil).

> Use this method only
> for an initialization of fields. Simply set values to the "this" buffer (e.g.
> this.Field1 = '') and no refresh is needed.

> Also, you should update other tables during a record saving - e.g. in the
> insert() method.

Yes, but I need to display updated data on the form, on the controls
connected with the header table, immediately after update of lines
table.

Regards

0 new messages