Quote from
Gaev on September 24, 2019, 3:36 am
@neobook
Why does the variable not change?
Unlike regular variables, if you assign database fields to captions of TextBoxes, PushButtons etc., their values will NOT be automatically updated.
One way to work around this is to use the "subroutine" ... from the Help file ...
dbpOpenTable "database id" "table" "subroutine"
subroutine
The name of a subroutine from your publication's Subroutine Action. The subroutine specified here will be automatically executed whenever the table is updated or the current record number changes. This can be useful if you want to activity to take place whenever the reader displays a different record. Subroutines are entered from the Actions page of NeoBook's Book Properties screen. NeoBook's help file contains more information on using subroutines.
In the named subroutine, you can do something like ...
SetVar "[currentPRODUCTO]" "[datos.Tabla1.PRODUCTO]"
... and specify [currentPRODUCTO] for the object's caption.
@neobook
Why does the variable not change?
Unlike regular variables, if you assign database fields to captions of TextBoxes, PushButtons etc., their values will NOT be automatically updated.
One way to work around this is to use the "subroutine" ... from the Help file ...
dbpOpenTable "database id" "table" "subroutine"
subroutine
The name of a subroutine from your publication's Subroutine Action. The subroutine specified here will be automatically executed whenever the table is updated or the current record number changes. This can be useful if you want to activity to take place whenever the reader displays a different record. Subroutines are entered from the Actions page of NeoBook's Book Properties screen. NeoBook's help file contains more information on using subroutines.
In the named subroutine, you can do something like ...
SetVar "[currentPRODUCTO]" "[datos.Tabla1.PRODUCTO]"
... and specify [currentPRODUCTO] for the object's caption.
neobook has reacted to this post.