Hello

When I build a formula for calculation in two fields of separated tables why does it occurs just once?

I mean the formula works for those fields just one time.How can I extend it for more time?

Hello

When I build a formula for calculation in two fields of separated tables why does it occurs just once?

I mean the formula works for those fields just one time.How can I extend it for more time?

I'm not sure that I fully understand the issue, but it sounds as if you may have a field set to auto-enter by calculation. If that is the case, the formula will be initially set when a record is created and will not then change unless triggered to do so by some means. On the other hand if the field is a calculation field that is stored, it also may not refresh unless triggered.

What value is held in the NUMBER field? How is that field set? How is it different from the CurrentNumber field? There seems to me to be some confusion of structure here. You appear to have another table called Order. What data does that table hold? Perhaps you could post a screenshot of the table's definitions also.

I think your calculation field is a repeating field (an opening bracket can be seen on the screenshot)

Probably the referenced fields are not repeating.

If they were repeating, the second repetition of the calculation field would use the second repetition of the other fields, third would use the third...

Because they are not repeating (my hypothesis) you need to tell FileMaker that you are always referring to the first repetion. You should use Extend ( nonRepeatingField ) for that.

HTH

Tanx for your answering but it didnt work.It represent an unknown number(?) in the field after calculation by this formula.

As I said my formula works just when the current number and tool number are the same.

I mean at first when the current number and tool number are the same it shows ? sign. then, when you order the tool it shows the correct number.But when you order again it doesnt work(same as last time)

It seems to me that you need to rethink your methodology. Your description in an earlier post—

"Number field in tool table is all tool we have in that kind.After ordering, we give the worker some tools.So we have to do the subtract (what I have done in CurrentNumber"—

… suggests that the two fields are functionally the same—i.e. they are intended to show the number currently in stock.

Then I believe what you need to do is

`CurrentNumber - Sum ( ORDER::num )`