AnsweredAssumed Answered

how to use script

Question asked by benkryton on Dec 3, 2010
Latest reply on Dec 7, 2010 by philmodjunk


how to use script



I'm new to FM so please go easy on me. I am trying to make a very basic stock control system and I'm not sure how to make a script. I have a simple stock locator database that consists of part numbers, quantity and bin location. I have two buttons. "Part in" and "part out".  I would like to make a text box that I can type a part number into and then press either  the "part in" or "part out" button to perform the following:

Part IN - Check to see if the part already exists in the data base. If yes, then increase quantity by one and display the record to indicate the bin location. If the part number does not exist in the database then create a new record with quantity set to 1 and display the record to allow the bin location to be added.

Part out - find and display the record and minus one from the quanty field and acknowledge it has been sucessfull in doing it.

I have two layouts. One displays the part #, quantity and bin and the other is more of a home layout that has the two buttons and a text box ready for the part # to be added.

Can anyone point me I the right direction?