Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2003
    Posts
    1

    Unanswered: Referring to specific record in script

    I'm having the hardest time with this. Basically, I'm trying to do a bill of materials - when you enter the ID code for say, a computer, it'll then deduct all the parts from a separate file that keeps a count of the inventory.

    Here's what I want to happen: You enter the code for the "computer", it goes to the "monitor" record, deducts the part, then goes to the "keyboard" record and deducts from the count that part, etc...

    If you have any ideas on how this could be accomplished, I'd appreciate it. I got it to work with a single item say, "keyboard", but I just can't get it to work with multiple items.

    Here's what I was thinking could work:

    If ORDER NUMBER = "COMPUTER"
    Set Field "INVENTORY::MONTIOR UNITS - 1"
    Set Field "INVENTORY::KEYBOARD UNITS - 1"

    Something like that. In theory at least.

    It's a complex problem, so I know I haven't done a good job of explaining, but your help would be most appreciated.

  2. #2
    Join Date
    Jul 2003
    Posts
    12
    Alex, I don't know if this will be a help or more of a problem. My thought is that you might want to get more detailed. Instead of saying, "I have 20 monitors and if I create 1 computer that's one less monitor," you might want to go about giving each inventory item a seperate ID. This means that all your monitors, keyboards, motherboards etc. would each have a unique inventory id (ex. KEY-0001, MB-0055, MON-00012, etc.). Now this may be painful at first, but if you are doing this for business reasons this would give you the ability to do some specific inventory queries and barcoding in the future.
    If you used this solution, your problem could be solved by relating each whole computer to the sum of its parts. This would mean assigning a purchase order or invoice number to each part that comprised the sold computer. You could then run a script that said "if this part has a PO and/or invoice number then mark that item as sold." You could then sort out those that were sold. You could also do count record calculations that would let you know just what you inventory is (ie. #keyboards sold/unsold etc).
    I hope this helps.

  3. #3
    Join Date
    Sep 2003
    Location
    Cincinnati, Oh USA
    Posts
    203

    Re: Referring to specific record in script

    This may help you. The attached is a simple inventory sample I made up for FM users. This may give you some ideas.

    Originally posted by alexm
    I'm having the hardest time with this. Basically, I'm trying to do a bill of materials - when you enter the ID code for say, a computer, it'll then deduct all the parts from a separate file that keeps a count of the inventory.

    Here's what I want to happen: You enter the code for the "computer", it goes to the "monitor" record, deducts the part, then goes to the "keyboard" record and deducts from the count that part, etc...

    If you have any ideas on how this could be accomplished, I'd appreciate it. I got it to work with a single item say, "keyboard", but I just can't get it to work with multiple items.

    Here's what I was thinking could work:

    If ORDER NUMBER = "COMPUTER"
    Set Field "INVENTORY::MONTIOR UNITS - 1"
    Set Field "INVENTORY::KEYBOARD UNITS - 1"

    Something like that. In theory at least.

    It's a complex problem, so I know I haven't done a good job of explaining, but your help would be most appreciated.
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •