||Re: Data module with a complex index
||Sun, 8 Dec 2019 07:15:55 +0200
On 2019-12-06 11:39 AM, Robbie Nott wrote:
Did you consider masterRowset and masterField using your index ?
Attached a simple dataModule I use to show a selected horse's endurance
Hope it helps.
Data module to use as finder for horse EDR performance
2017/10/24 Link enduro to HorseNames with the H_ID and use the new
complex index HIDDOR
created on H_ID + DOR in order to have the results ordered
Further, note the setup of the Enduro.dbf (as Results1
query) AND THE navigateByMaster = true !!!
This last setting allows me to use the HORSECODE field of
the Enduro.dbf in the same grid as the HorseNames.dbf fields !!
NOTE NOTE: The form MUST MUST have this EDR_NAMES1 rowset as the form's
rowset else the setup of the
Names grid using the Enduro HORSECODE field will NOT WORK !
class EDR_HRES_DM of DATAMODULE
left = -1.0
top = -1.0
this.EDR_NAMES1 = new WS_QUERY()
this.EDR_NAMES1.parent = this
left = 5.0
top = -20.0
sql = 'select * from "HorseNames.dbf" where IS_EDR = true'
requestLive = false //make this a non-editable rowset !
active = true
indexName = "HNME"
this.RESULTS1 = new WS_QUERY()
this.RESULTS1.parent = this
left = 66.0
top = -21.0
sql = 'select * from "Enduro.DBF"'
active = true
indexName = "HIDDOR"
masterRowset = form.edr_names1.rowset
masterFields = "H_ID"
navigateByMaster = true // See comment at top !!!!
this.rowset = this.edr_names1.rowset
//NOTE NOTE: The form MUST MUST have this rowset as the form rowset else
// the setup of the Names grid will NOT WORK !