make sure you created the realtionship with 2 tables , then
go to table b
create calculation field
I explain for you my problem ! I counted the number of records in a layout A from tableA ; and I would like to dislayu this summary field in an other layout B in a tableB.. tables "A" and "B" are related with an other table "C" . I juste xould to display the number existing in the previously layout A.Thanks again.
When you place a summary field From a related table on your layout, the relationship will determine what total or count is displayed. This could be a very different number that what you see on the layout for table A.
You may need to set a global variable or field to this value and put it on your other layouts to display a total or count that is consistent with what you have on your layout for Table A.
I can't make a summary field "global" !! Is it possible ??!!
No, but you can use a script to copy the value of the summary field to a global field or variable:
Set Field [YourTable::globalField ; Yourtable::SummaryField]
Set variable [$$GlobalVariable ; value: YourTable::SummaryField]
I don't inderstand where I must create thuis script?? on the global variable or on the summary field??!! Thaks
It's a script, not a field calculation. You'd created it using Manage | Scripts. The key detail that I can't give you is when and how to perform this script as there are a number of possible ways to set that up so that it happens automatically.
If you use a script to find records just before you get your count of records for table A, a final script step in the script could be one of the above two examples.
The OnLayoutExit trigger could perform a script with one of these two steps in it so that it is automatically updated each time you leave the layout.
If you are performing manual finds before you count records, you can use the OnModeChange trigger to perform the script each time a Find is perforomed on the Table A layout.
Thnak you :) It s Done.