Get (ActiveFieldContents) returns the value of the field that currently has your cursor in it. Thus, it's not the option to use here.
A summary field can compute a number of different totals depending on how it is referenced. What total do you want for this calculation?
The total of every record in the table? Every Record in the current found set? Or every record related to the current customer record?
Also, please describe the relationship that links your records in ValueTable to Customers.
Let me try to explain better:
The ValueTable is a fixed value table. It's a single table with a few rows. Example:
Description Value Lawyer 1000€ Maintenance 2000€ Other 3000€
Now this is a fixed value table. Imagine a few more like this and with a third Summary Field with the total of this records rows:
Description Value ValueTotalSummary Lawyer 1000€ 6000€ Maintenance 2000€ 6000€ Other 3000€ 6000€
This is like i have now in my database
Now, in the Client Tables i have the some fields to identify the client and then i have two fields: FixedValue AND CalcValue.
In the FixedValue i also have values that should always remain the same, and on the CalcValue is where i want to do a Calculation!
So the calc that i want to do is:
ValueTable::ValueTotalSummary*FixedValue / 1000 --> This is going to define the CalcValue on each client Records Row.
I know that something is missing here. Even i trying to understand how can i create a relationship with the ValueTable without mess around the records.
Above is the Relationships:
You are trying to explain here, but it still doesn't make sense.
when you open manage | database | relationships, which of these relationships do you have?
or do you have:
To ask it another way, your sample data shows a total vale of 6000. Is this the total of all records in the fixed value table?
and do you want that 6000 to be used in the calculation like this?
6,000*FixedValue / 1000
When you refer to a summary field from a related table, you do not get the total of all the records in the table nor do you get the total of all the records in the found set. Instead you get the total of all the records in the fixed value table that are linked to the current record in your client table.
If you want to use the total of all records in the fixed value table, use a relationship defined like this:
The fields you match on do not matter when you use the cartesian join operator (x). It matches any record in clients to all the records in fixedvalue so with this relationship: ValueTable::ValueTotalSummary*FixedValue / 1000
ValueTotalSummary will be the total of all records in the value table.
I've changed the relationship to make things easier.
By now i have this:
The scenario on my database is this:
Name Address FixedValue CalcValue __pkClients (Auto-Enter) John Smith NewYork 0,3667 1 Joanne Smith NewYork 0,6668 2
Description Value ValueTotal (Summary Field) Lawyer 1000€ 6000€ Other 5000€ 6000€
On this table, when i created the Summary Field, to totalize all Value records, it created the total value for each record on ValueTotal field.
On Clients Table, in the CalcValue field, and on each record i want to do the following calc:
Name Address FixedValue CalcValue __pkClients (Auto-Enter) John Smith NewYork 0,3667 6000*FixedValue / 1000 1 Joanne Smith NewYork 0,6668 6000*FixedValue / 1000 2
I Just tried to Change the relationship to: Clients::__pkClients---X---ValueTable::_fkClients and it works. Now the values are calculated automatically.
Sorry for the mess!