Replace Field Contents Option: [X] Don't Perform auto-enter

Idea created by mrwatson-gbs on Nov 17, 2015



    Developers need a way to change field values WITHOUT triggering recalculation of auto-enter and lookup fields.


    Editors note: In the face of a new (+ great) idea from FabriceNordmann to add an option to allow the Replace Field Contents step to act only on the current record, I have changed this idea (including the title) to focus on the Replace Field Contents step instead of the Set Field step. => Please read the idea again together with the idea from Fabrice (see below), and reconsider your vote (<= jbante @u! ).

    Deletions are in red, additions in green


    The reason is because there are situations where it is necessary to change field values WITHOUT recalculating other values. For example, when duplicating an offer or converting it to a partial invoice, it may be necessary to to change the quantity of a line item, but without re-looking up current prices and exchange rates - the prices and rates of the original offer must continue to be valid!


    The auto-enter and lookup mechanisms are ideal for 'normal' input scenarios, causing the fields in the example to take on the current bulk price for the given quantity but become a problem and a hurdle, when the situation is not the normal input scenario.



    Currently the only way to change the value of a field without triggering recalculation is to use the Import Records script step or menu command with the option "Don't Perform auto-enter while importing". Fields that need to have DIFFERENT values than are available in the source records have to be corrected AFTER THE IMPORT.



    NEW Update!

    Please check out this brilliant solution to this problem:


    Replace field contents: limit to current record related records

    (particularly my comment on the synergy of the two ideas)


    OLD Update!

    Please check out the better alternative - and in the mean time maybe not so good solution to this problem:
    Set Auto-Enter [ Off ] script step


    (However you might want to finish reading this entry first)




    The proposal


    • Both the Set Field and the The Replace Field Contents steps should have an option [X] Don't Perform auto-enter
    • When checked the column (or field*) will be set without triggering Auto-Enter and lookups in exactly the same fashion as the Import Records option


    * the field of the current record only when Replace Field Contents has the option 'No auto enter'


    It can be argued that this functionality could be potentially dangerous for data consistency - which is true if incorrectly used - however, it can also be used exactly for the sake of data consistency, as testified by the above example (see my comment).


    Nevertheless we might want to consider NOT offering this option in the replace field from the records menu.




    • Data correctness and consistency: can be maintained, by correcting field data WITHOUT causing lookups
    • Increased Productivity: Workarounds of constructing, exporting + re-importing values can be avoided.
    • Synergy: AutoEnter + Lookup techniques will be revitalized / gain more value (some developers have started using script-triggers instead)
    • Improved performance: see use case  2


    Use Cases


    1. 'Correction' of data in certain situations, as described in the example above
    2. Performance improvements
      • Given a table with a very 'heavy' AutoEnter field - or a hierarchy of AutoEnter fields - that combine N field inputs, using the standard Set Field command to set the value of each of those input fields will cause the field(s) to be recalculated N times.
      • Using the option [X] Don't Perform auto-enter for all but the LAST Set Field will make it possible to reduce the calculation of the AutoEnter field to JUST ONCE.
      • To get a feeling of how much this could help: if the calculation references just 10 fields and takes one second to calculate, this would take 10 seconds with the standard Set Field command and just 1 second with the new option.