Is the first image from a list view layout where each row is a different record in the layout's underlying table or have you shown us rows of data in a portal to a related table?
Have you set up a single check box field with multiple values or do you have multiple fields with a single check box value each?
1st picture is portal rows. It is a single checkbox having multiple values. The values are changed as i selected part type. Thank you
The simplest (not necessarily the best) solution is to use that checkbox field as one of two match fields to a table of prices. My names will differ from yours so you'll need to substitute your names for mine in the following example
First, your table of prices needs to be structured like this:
PartType ; CheckBoxValue ; Price
Piston ; antifriction coat ; price for piston anti friction coat
Piston ; Bar1 ; Price for piston Bar1
In otherwords, each record is a price for a single unique combination of partType and checkbox value. The text in CheckBoxValue as to exactly match the defined value in your value list for that option. Both this field and the checkbox field shown in your portal must be of type text.
You can then set up this relationship between your table of prices and your portal's table:
PortalTable::PartType = Prices::PartType AND
PortalTable::CheckBoxesField = Prices::CheckBoxValue
Your Price field can then use Sum ( Prices::Price ) to auto-enter the total amount of the individual prices selected for that record in your portal. You need to set this up as an auto-enter calculation, not a calculation field. That way, future price changes to your Prices table won't alter the computed amounts from previous records.
Happy New year.. Thank you for the solution. it works well. But I face another problem
For the Price field summing up checked box items, I use auto-enter calculation field as your suggestion but the value is not shown at the field.
On the contrary, if I use calculation field, the value is shown and updated as I check the items.
But I have to use auto-enter calculation field not to change the calculated price in my invoice in the future.
As you see the picture, I made two field. One is calculation field and the other one is auto-enter calculation field. Actually the two fields are supposed to have same valve. but auto enter calculation field does not work.
Do you have any solution for this??
The auto-entered calculation should work. Did you clear the "do not replace existing value" option? You can clear this and future price changes still will not modify the calculated price.