1 Reply Latest reply on Feb 15, 2012 3:46 PM by philmodjunk

    basic scripting...series of new records including constant field contents

    RobertFisher

      Title

      basic scripting...series of new records including constant field contents

      Post

      I'm trying to piece together an inventory program that will let me track parts from items that are being disassembled.  Ideally I would like to set up a script to create a series of records, accept input for the constant fields, and automatically assign a value to the non-constant field for each record.  The constant fields include the disassembly date, the item being disassembled, and the person doing the work.  The non-constant field would contain descriptions like "AAA battery", "transistor", "capacitor", etc. etc.

      Would anyone have an example of something like this, or help me frame the problem in a way that makes more sense?

        • 1. Re: basic scripting...series of new records including constant field contents
          philmodjunk

          Those 'constant' fields represent data only entered once and which should entered in a different, related record with a link to your list of parts removed.

          EquipmentDisassembly------<PartsRemoved

          EquipmentDisassembly::__pk_EquipID = PartsRemoved::_fk_EquipID

          Make _pk_EquipID an autoentered serial number and define all your "constant" fields in EquipmentDisassembly.

          To make data entry in the portal easier,, double click the relationship line between these two tables and select "Allow Creation of Records via this relationship" for PartsRemoved.

          Put a portal to PartsRemoved on the EquipmentDisassembly and use it to record data on each part that is removed. This will be much like a sales invoice where you have one invoice record to document the customer, date sold, total sale, etc with a related table of line items to list each item purchased in that sales transaction.