Forum Discussion

KenCasser's avatar
KenCasser
Qrew Cadet
6 years ago

Price Change Problem

I've noticed that in our Quotations table, our Unit Price field is populated from a System Variable so that we can change our pricing as needed.  Unfortunately, when I make a change to that Variable, it affects every Quote, old _and _new.  I would like unit price changes to only affect _new_ quotes.  How would I do this?

5 Replies

  • No problem, snapshot fields to the rescue.

    https://help.quickbase.com/user-assistance/setting_up_snapshot_fields.html

    But you will need to change from a system variable to a table of prices.  I gather that you have very few prices,  so they are probably an hourly rates.  So I will use that an an example.

    Make a table with 1 record in it, Add the record and then block all users, even admin from adding or deleting.

    Make fields for your Prices and then edit the record to fill in the prices.

    For example 

    Lawyer Hourly Rate $600
    Paralegal Rate $ 250
    Photo copying rate $50
    Quick Base Developer Rate ... etc

    The record will be [Record ID#] because there is only 1 record.

    Make a relationship to the detail table and let it create a new field for you for that Relationship

    Then edit the field to rename it [Link to rates (=1)]
     and then change the field type to be formula numeric with a formula of 1.

    Lookup the rates by label them like

    Lawyer rate (lookup)

    Then make a duplicate set of fields naked like

    Lawyer rate

    and edit the field properties to make them a snapshot of their respective lookup field.  The magic is that the will "snapshot" or freeze the lookup field value at the time the record is created, and not subsequently change when the lookup field changes.



    • QuickBaseCoachD's avatar
      QuickBaseCoachD
      Qrew Captain
      edit
      The record will be [Record ID#]  of 1 because there is only 1 record.
  • Are you able to change the way you do your pricing to utilize a relationship that can use the Snapshot feature of a field to capture the value of a Lookup field when a record is created?

    When a quotation line item/record is created; and it is referencing a parent-record that stores the price, a numeric-field can capture the value of the lookup field that contains the current price and store that price as a permanent value within the record.

    This is typically the standard way to handle this type of scenario.

    If you need to continue using application variables you can consider ways to transfer the value of the unit price into a numeric-field when the records are being created; the choice of method you do this with will depend on how you are creating your quotations.  (i.e. Form Rules, QBActions, Webhooks, Automations).  All of these options come with some limitations and possibility of failure for one reason or another; which is why the snapshot of the lookup field is recommended for this type of requirement.