A simple script step:
Set FIeld [ YourTable:: PizzaBaseLeft ; YourTable:: PizzaBaseLeft - YourTable:: PizzaBaseUsed]
Can do this, but you might want to consider an approach that logs your usage in a ledger style layout where you make a new entry each time you add/remove supplies. That will allow you to see how your usage rates and inventory levels change over time.
yes.......but can u tell me more detail about the script like where do i type it and set in to the button and things.................
I am sorry about knowing such little about it.......i am a newbie at this
We're in different time zones, both your last two posts were put up late at night my time....
You can write your script in manage scripts, found on the Scripts menu. You'll find a button for starting a new script. Then when you add a new button to a layout, you can select Perform Script and specify the name of this new script.
For a single line script like I posted previously, you can also simply select the single script step in the button set up dialog and enter the options you need for this step to work.
If this is all new to you, you might want to investigate getting a book on Filemaker or some on line tutorials on how to do this. We'll help you all we can, but adding those extra sources might speed up the rate at which you learn how to use Filemaker.
Do I set the field "PizzaBase Left" to calculations? I typed the whole script "SetField[....]" in ..but the button still didn't work....is it because i type it on wrong place? i did type it in the specify and option in the script manage!! ...............
oh yeah...it says the "specified table could not be found" when i type the scripe in
the wole script i type in there is "Set Field [ Inventory Management:: PizzaBaseLeft ; Inventory Management:: PizzaBaseLeft - Inventory Management:: PizzaBaseUsed]".....
GUESS HAVE TO WAIT FOR PRO ANSWER AGAIN~~~ HA
Mr. Caulkins ?
The name of the script step you want to use is:
You don't type that in, you select it from the list of script steps. You can see the list of script steps when you define or edit your button. Or, you can see the list of steps when you edit a script.
The Set Field step has two Specify buttons:
1. Specify the target field. Click this and you'll get a list of fields to choose from. Choose your PizzaBaseLeft field.
2. Specify the calculation, in other words, what it is you want to go in the field.
Here is where you actually type something! You could type:
Inventory Management:: PizzaBaseLeft - Inventory Management:: PizzaBaseUsed
But I would advise you to actually select the fields from the field list to avoid mistakes. The only keyboard entry needed is the minus sign, and even that can be inserted with a button in the calc dialog.
When you're all done, the script step will appear in the button or script dialog to look something like this:
Set Field [ Inventory Management:: PizzaBaseLeft ; Inventory Management:: PizzaBaseLeft - Inventory Management:: PizzaBaseUsed]
But you DON'T type all that into a field!
Hope that helped.
Hi make sure you have correct field name, other wise FMP doesnt say that
Thanks guys~~~ you all being very helpful~~~~
thank u so much all of u who save my life at working at filemaker.......it's so tricky~~ Thank u
Glad the others pitched in. I've been busy with two major database roll outs and haven't been able to access the forum in a few days...