3 Replies Latest reply on Feb 11, 2010 1:18 PM by philmodjunk

    Help With Script

    psbajohr

      Title

      Help With Script

      Post

      Hello,

       

      I've come to the gurus once again!

       

      I have two tables in an inventory I have built.  One inventory is items I have in stock, and the second is an inventory which is used to track items that have been issued.

       

      I am trying to create a script which allows me to "issue" one record from the in stock table, to the issued inventory table.  I also would like to delete the record from the in-stock inventory once it has been moved to issued.

       

      My script works fine, however, i am getting all the copied data in one column, instead of separate ones (i.e. serial number, expiration date)  Is there a way I can specify how the data is pasted into the issued inventory?

       

      I am using FM10, win xp.

       

      Thanks in advance,

      Paul

       

       

       

        • 1. Re: Help With Script
          philmodjunk
            

          I don't recommend deleting records here.

           

          Instead, give your inventory table a "status" field.

           

          This field can store "in" when the item is in inventory and "out" when it is out.

           

          You may not need an Issue table at all depending on your needs and how you've set up your inventory table.

           

          If you do, simply link your two tables by an ID number in Manage | Database | Relationships.

           

          Instead of copying all your inventory fields over to the Issue table, just use set field to enter the item's ID number. With the relationship in place, you can simply add the fields from your inventory table to your issue layout to show name, description and other such fields from that table.

          • 2. Re: Help With Script
            psbajohr
              

            Phil,

             

            Thanks for the response, my issue is this...

             

            Although your solution is definetly viable, I do need to have these records deleted when they are moved, and would like to have an "on hand" inventory and a separate "issued" inventory. 

             

            When I move records to the issued inventory, I have a script that generates a memorandom which accompanies the items in shipping.

             

            Basically all I want to do is have the script I am using now delete the initial record, then when pasting into the issued inventory paste into each field, as opposed to just one, which it is doing now.

             

            I can paste the script im using now if youd like.

             

            Paul

            • 3. Re: Help With Script
              philmodjunk
                

              You can do what you describe without actually deleting records.

               

              You can perform a find to exclude all "out" items and the found set will then show you exactly which items you have "on hand".

               

              If you insist on your approach, you'll have to copy over the fields or your record one field at a time.