3 Replies Latest reply on Apr 11, 2017 8:15 AM by ericjlindholm

    auto-enter field evaluation behavior

    ericjlindholm

      I have 3 tables occurrences.

       

      quotes——<quoteItems———quoteItemHardware

       

      a quoteItemHardware record is only created if the inventory item added to the quote is an item to for a pull sheet.  for a labor or delivery charge, no quoteItemHardware is created. 

       

      There are number/text/date fields in quoteItemsHardware that are populated auto-enter calculations from the quote TO.  at the moment, my add to quote script needs to commit the quoteItems record before creating the quoteItemHardware record for the auto enter calc fields to evaluate properly.  I am trying to avoid needing this commit step to improve performance over wan. 

       

      one option I’ve found is to set vars in the script and perform set fields for everything that should be auto-entered.   I would rather script setting the key fields and letting auto enters evaluate after the final commit.

       

      my current script looks something like this.  the layout table = quoteItems

       

      set var [ $createQuoteItemHardware ; * irrelevant conditions * ; 1 ]

      set var [ $id_quote::id ; quote::id ]

       

      new record

       

      set field [ quoteItems::id_qoute ; $id_quote ]

      If [ $createQuoteItemHardware ]

        Commit ** the commit step i would like to work around **

        set var [ $id_quoteItem ; quoteItem::id ]

        set field [ quoteItemHardware::id_quote ; $id_quote ]

        set field [ quoteItemHardware::id_quoteItem ; $id_quoteItem]

      end if

       

       

      is there any combinations of fields settings that will allow this?  Ive done some testing but the result of those fields not evaluating no matter what does not seem to make sense.