Thanks. It helps fix a few things. We’ve developed a pretty complex application that is used by a scientific research group to enter data, and unfortunately many parts of it are affected by the update.
The most critical part of our application is that users will enter data about an "experiment", which has a unique experiment ID in the database, and then they will click a button to open a new form that shows one or more "plates", which have unique plate IDs. The plates are normally filtered so that users only see the ones which are related to the specific experiment. Currently, the following script is executed when the users click the button to open the plates:
records = this.table.getTableCursor( this.uuid )
field = records.getField( 'experiment_id' )
experiment_id = field.value
// an SQL query returns the min and max plate_id values which are related to the current experiment_id
qres = this.dataSource.sqlSelect( 'SELECT ...' )
min = qres.getField( 'min' ).value
max = qres.getField( 'max' ).value
// use the new way to import the plates form
dlg = project.loadForm( '/For Admins/Plates/plate-observation' )
// in the imported form, show only the range of plates associated with the experiment
dlg.records.addFilter( 'plate_id BETWEEN ' + min + ' AND ' + max )
dlg.records.applyFilters()
dlg.ExpSubForm.records.reloadRecords()
dlg.ObservationsTableView.reload()
dlg.exec()
The new form does not open with this code. If I move the dlg.exec() line so it is right after the addFilter line, the new window opens but the records are not filtered.
Another more minor issue: we use the following script in the QObject needUpdate signal in order to grey out navigation buttons when the user is on the first record in a form. However, the presence of that code now results in a lot of errors when the form is first opened (see attached screenshot).
records = this.table.getTableCursor( this.uuid )
sender.enabled = records.position > 0