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?
Then I believe what you need to do is
CurrentNumber - Sum ( ORDER::num )
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.
As you see, I want Current Number by that formula which I wrote there.but it just works once.
You mean by trigger it would be solved?
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.
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). num in order table is number of tools which the worker orders
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.
I didnt understand.how should I extend using this formula?
I mean what I have to do for this action be done several time
When the tool is ordered the number of it would be reduced.Then the calculation doesnt work but when I delete the ordered Record that the number of tools and current tools are the same the calculation work correctly
There were no more answer for my question!!!?
maybe because you didn't try the reply I gave you.
Extend ( tool::number ) - Extend ( Order::num )
Not sure though
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.
they must not be the same when some one orders the tool.after calculation on TOOL::NUMBER and ORDER::num we have to build the TOOL::CurrentNumber
So what exactly is TOOL::NUMBER if it is not current number in stock?
TOOL::NUMBER is number of all tools in that kind.
When the worker orders a tool we subtract number of ordered tool by TOOL::NUMBER. It will be CurrentNumber.(CurrentNumber=TOOL::NUMBER-ORDER::num)
So current number would be how many tool we have now, after the workers order.
Thank you so,so much
It worked by SUM
Retrieving data ...