I have a file structure where VALUTA is a parent of LEV which is parent to BEH. I add BEH_DD to a dbView. Then, Main DDO is then automatically set to BEH. I also use DDO Column Selector to add two fields from the LEV table, LEV.LEV_NR and LEV.NAMN, to the view.
In Procedure Activating, I use a selection list to pick a record from the LEV file and find that record. Then, I expected that both the dbForms would be filled with data, but only the lev_no is displayed. The lev_name dbForm is empty. Why is it so?
If I change Main_DD and Server to oLev_DD both, forms are filed with data. What does it mean to change Main_DD in this way from the childmost file to one in the middle of the data structure? Does it have any consequences?
Bengt
Code:
Use Windows.pkg
Use DFClient.pkg
Use VALUTA.DD
Use LEV.DD
Use BEH.DD
Use DFEntry.pkg
Deferred_View Activate_oTestLev for ;
Object oTestLev is a dbView
Object oVALUTA_DD is a Valuta_DataDictionary
End_Object
Object oLEV_DD is a Lev_DataDictionary
Set DDO_Server to oVALUTA_DD
End_Object
Object oBEH_DD is a Beh_DataDictionary
Set DDO_Server to oLEV_DD
End_Object
Set Main_DD to oBEH_DD
Set Server to oBEH_DD
Set Border_Style to Border_Thick
Set Size to 72 282
Set Location to 1 -6
Set Label to "TestLev"
Object oLEV_LEV_NO is a dbForm
Entry_Item LEV.LEV_NR
Set Server to oLEV_DD
Set Location to 16 71
Set Size to 13 102
Set Label to "LEV NR:"
End_Object
Object oLEV_NAMN is a dbForm
Entry_Item LEV.NAMN
Set Server to oLEV_DD
Set Location to 43 71
Set Size to 13 201
Set Label to "NAME:"
End_Object
Procedure Activating
String sLev
Forward Send Activating
Get LevVal of Lev_sl "" to sLev
Send Clear_All of oLEV_DD
Move sLev to LEV.LEV_NR
Send Find of oLEV_DD EQ 1
End_Procedure
Cd_End_Object