PDA

View Full Version : Related fields not showing with a system-file



Roel Westhoff [W4]
3-Feb-2015, 08:00 AM
Hi All,

DF18.1.a1

Not sure if it is a bug or just my programming

The problem:
Related fields are not showing when a system-file is presented. The data of the systemfile itself is shown.
The save procedure is executed and related fields are filled in the database but when i reopen the view (restart the webapp) no related-field data is shown

Below the data-structure.



Object oTimezone_DD is a cTimezoneDataDictionary
End_Object

Object oCurrency_DD is a cCurrencyDataDictionary
End_Object

Object oSys_DD is a cSysDataDictionary
Set DDO_server to oCurrency_DD
Set DDO_server to oTimezone_DD
Set pbClearAfterSave to False

// define local relationship
Set pbUseDDRelates to True
Set Field_Related_FileField Field Sys.CurrentTimezone to File_Field Timezone.ID
Set Field_Related_FileField Field Sys.CurrentCurrency to File_Field Currency.Code

End_Object

Set Main_DD to oSys_DD
Set Server To oSys_DD

Procedure OnShow
Send Clear to oSys_dd
Send Rebuild_Constraints to oSys_dd
End_Procedure


Pretty straightforward.
Field length are identical and indexes has been placed on timezone.id and currency.code
Done this hunderds of times.....

Roel

Dennis Piccioni
8-Apr-2015, 01:53 PM
Hi Roel,

is this still happening or is it resolved?

Roel Westhoff [W4]
8-Apr-2015, 05:27 PM
Hello Dennis,

The problem is still there in df18.1a3

Roel

Dennis Piccioni
14-Apr-2015, 04:01 PM
I got this working with a small change:


Procedure OnShow
// Send Clear to oSys_dd
// Send Rebuild_Constraints to oSys_dd
Send Find of oSys_DD EQ 0
End_Procedure

This does things we suggest not doing with system tables. I would try it without the clear, just the Find.

Roel Westhoff [W4]
15-Apr-2015, 03:56 PM
Hello Dennis,

This helped. Thanks...
Is there a reason why the related records where not shown. The sys.record was found and shown in the view in my first attempt.

Roel

Dennis Piccioni
16-Apr-2015, 06:47 PM
No not really. I'm not quite certain how this should work, it's somewhat undefined, since you are never supposed to clear or find a system record.