Jump to content
Server Maintenance This Week. ×

One script for all records


jyory

This topic is 5258 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

Hi All,

I am completely new to filemaker, so my question might seem silly to some.

Am working on a stores database which accounts for everything that comes into the store and whatever is issued out of the store daily,for a restaurant.

I have done most of it and its working well, but am having one problem. i have an inventory table which keeps track of the stock movement for every item, everyday(that is what comes in and what goes out) it then calculates the closing stock for the day.It has a total of 768 records for now.

What i want is to set a script in such a way that the days closing stock for each item/record will be dispalyed as the opening stock on the following day. I have already written the script but it only works on one record,which means u have to go to each record every morning and execute the script(this will be quite cumbersome for 700+ records) is there a way i can write my script so that on loading the database each morning all the records in my inventory table will reset themselves so that the previous days closing stock can be the new days opening stock?

PS. I have alredy tried looping but it makes the database take forever to load.

Thank you

Edited by Guest
Link to comment
Share on other sites

Welcome to the forums.

I could tell you how to do what you ask, but it wouldn't be doing you any favours because that's not the right way to go about it.

I don't fully understand your business needs, but off the top of my head I'd suggest 2 fields for each inventory item, one to track when it came in, and another for when it went out. If the item hasn't gone out then the "item out" field will be empty. Your stock for the next day will therefore consist of the previous records that haven't gone out, plus those that come in new.

Other people in the Forums are much more experienced in inventory systems than me, hopefully they will chime in and give some even better advice.

Link to comment
Share on other sites

I can't quite picture what you're trying to do here. Why not just have a single number that represents the actual current quantity? If you need to keep a log of what went in and out, use a related table.

Link to comment
Share on other sites

This topic is 5258 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.