proc getDatabaseHandle {} {
set buffer [GuidoExecServer LegacyGetCurrentDatabaseHandle [subst {sessionType = "GeologyDatabase"}]]
return [GuidoGetParamBufferValue $buffer DatabaseHandle]
}
proc updateConstraintList {table field value constraints} {
set dbHandle [getDatabaseHandle]
set rowNumber [$constraints getEditingRow]
set current_field "[$field getCurrentValue $rowNumber]"
$value setDatabaseHandle $dbHandle
$value setTableHandle $table
$value setColumnHandle "$current_field"
$value updateBrowserList
}
GuidoForm frmRRMConstrainSampleData {
-label "Define query constraints"
-layout BoxLayout Y_AXIS
-help_id 1714
-tip "DYNAMIC_SHELLS_TIP_005"
GuidoPanel panel1 {
-layout BoxLayout X_AXIS
GuidoLabel label112 {
-label "Table Name : Collar"
}
}
GuidoPanel MainPanel2 {
-layout BoxLayout Y_AXIS
GuidoPanel panel2222 {
-layout BoxLayout X_AXIS
GuidoScrollPane scroll1 {
-height 10
GuidoTable constraints {
-instances 1 1 DB_MAX_CONSTR
-interactive true
set databaseHandle [getDatabaseHandle]
GuidoTableFieldBrowser field {
-display_length 13
-format none
-label "Field name"
-max_length 18
-database_handle $databaseHandle
-table_handle collar
}
$field updateBrowserList
GuidoComboBox operator {
-default =
-display_length 5
-format none
-label Operand
-max_length 2
-no_mlt
-null false
-value_in < <= > >= <> =
}
GuidoColumnValueBrowser value {
-display_length 14
-format none
-label "Constraint Value"
-max_length 32
-translate none
-sorted_list true
-distinct true
-null true
-exclusive false
-database_handle $databaseHandle
-table_handle collar
}
$value updateBrowserList
}
}
}
$field setActionCallback valueChanged {[updateConstraintList "collar" $field $value $constraints]}
$value setActionCallback focusGained {[updateConstraintList "collar" $field $value $constraints]}
GuidoPanel buttonPanel1 {
-layout FlowLayout Left
GuidoButton helpButton2 {
-action valueChanged { [$frmRRMConstrainSampleData setStatus "help"] }
-icon "icons/16/help.png"
-caption " "
}
GuidoFiller filler1222 {
-width 8
}
GuidoButton prevButton2 {
-action valueChanged { [$frmRRMConstrainSampleData setStatus "previous"] }
-display_length 10
-icon "icons/LeftArrow.gif"
-caption "Previous"
}
GuidoButton nextButton2 {
-action valueChanged { [$frmRRMConstrainSampleData setStatus "next"] }
-display_length 9
-icon "icons/RightArrow.gif"
-caption "Next"
}
GuidoButton cancelButton2 {
-action valueChanged { [$frmRRMConstrainSampleData setStatus "cancel"] }
-display_length 9
-icon "icons/cancel.png"
-caption "Cancel"
}
}
}
}
