2 Replies Latest reply on Oct 13, 2009 9:17 AM by Brucey

    Increasing the price of an item by a percentage in all records

    Brucey

      Title

      Increasing the price of an item by a percentage in all records

      Post

      I have a product table which contains 50 records The table has 3 fields, Type, Name and Price.

       

      I want to be able to increase the price of all the products by a certain percentage.  Can anyone tell me the script steps I need to use so I can increase the price in a single action to all records.

       

      When I tried to solve this problem by trying to increase all the prices by 10%, only the last record was updated, not all.

       

      Any help appreciated. 

        • 1. Re: Increasing the price of an item by a percentage in all records
          LaRetta_1
            

          Always back up before applying a mass update.  Show all records and place your cursor in the price field.  Select Records > Replace Field Contents > Replace with calculated result and then Specify and type into the calculation box (where price is your price field) :  price + price * .1 ... for 10% increase.  Then click Replace.  If this file is being served, protect from record locking issues.

           

          UPDATE:  However, I believe that it would be better to have a table with your prices and an EffectiveDate (and add new records when you change your price) or if you ALWAYS will mass update your prices, have another table with only the percentage of increase.  Why?  Because it will assuredly come in handy to have that kind of audit trail on your prices. 

          • 2. Re: Increasing the price of an item by a percentage in all records
            Brucey
               Sorry about the delay getting back to you.  The solution worked.  Thanks