GuidoScript scripts/geologyutilities.tcl
proc getDatabaseHandle {} {
set buffer [GuidoExecServer LegacyGetCurrentDatabaseHandle [subst {sessionType = "GeologyDatabase"}]]
return [GuidoGetParamBufferValue $buffer DatabaseHandle]
}
proc updateGeoFieldList { table field } {
$field setTableHandle [$table getCurrentValue]
$field updateBrowserList
}
GuidoForm frm01323 {
-default_buttons
-label "Save Drillhole Composites"
-tip APP_SAVE_COMPOSITES_TIP
GuidoCheckBox save_composites {
-default false
-label "Save composites to database"
-selected_value Y
-tip "Specify whether to save any modified composites to the database."
-unselected_value N
}
set databaseHandle [getDatabaseHandle]
GuidoDatabaseTableBrowser table_name {
-dependency {"[$save_composites getCurrentValue]" == "Y"}
-display_length 12
-format none
-label "Composite table"
-max_length 18
-database_handle $databaseHandle
-table_types "interval"
-null false
-translate lower
-tip DB_WRITE_COMPOSITE_INTERVALS_TIP
}
$table_name updateBrowserList
GuidoTableFieldBrowser field_name {
-dependency {"[$save_composites getCurrentValue]" == "Y"}
-validation {[validateTableFieldPair $table_name $field_name]}
-display_length 12
-format none
-label "Composite field"
-max_length 18
-database_handle $databaseHandle
-table_handle [$table_name getCurrentValue]
-field_types "optional"
-null false
-tip DB_WRITE_COMPOSITE_INTERVALS_TIP
-translate lower
}
$field_name updateBrowserList
$table_name setActionCallback valueChanged {[updateGeoFieldList $table_name $field_name]}
}
