3 Replies Latest reply on Jan 11, 2011 12:21 PM by philmodjunk

    Calculation Field Override



      Calculation Field Override


      I have a calculation field on a schedule page that looks up times of an event from our work orders (Invoices) table. In some cases, I need to be able to put in the work order on separate days and be able to change the field.

      For example, a rental is happening on 1/12 at 11am and ends 1/14 at 1PM, but a tech needs to be there on 1/13 at 9am for a rehearsal. In this case, I would need to link the work order/invoice with an additional day so the tech knew what time to be there on the middle day.

      Currently, when I put an event on a schedule day, it populates the rental start and end date and times for load in/out. This is fine for the start date and end date. Sometimes, though we need to note other days and times in these fields on this one layout.

      I have a linking table between the Invoices and Shedule tables to allow this.

      If I use an auto-enter calculation for this field, it inputs the data only when I first enter the invoice number and doesn't mirror the invoice as a calculation field does. It would be great if I could modify a calculation field without changing what appears on the work order/invoice.

        • 1. Re: Calculation Field Override

          If you are using an auto-enter calculation, then you can also edit the field directly.

          You might also be able to link a work order to all the day records using a relationship with inequality operators instead of =.

          WorkORder::StartDate < Schedule::Date AND
          WOrkOrder::EndDate > Schedule::Date

          is one way that might work.

          • 2. Re: Calculation Field Override

            What do you mean by "If you are using an auto-enter calculation, then you can also edit the field directly"

            I created an auto-enter calculation for a LoadInDateTime field in the linking table. The calculation simply reads Invoices::LoadInDateTime.

            This way, I don't edit the Invoice directly.

            Where do I try this:

            "WorkORder::StartDate < Schedule::Date AND
            WOrkOrder::EndDate > Schedule::Date" ?

            I'm not sure how to do this or where to put it =)

            • 3. Re: Calculation Field Override

              I mean you can place this field on a layout and edit the data in the field to override what the auto-enter calculation entred into this field. A script could be used to modify the contents of the field. If this were a field of type calculation, you wouldn't be able to do that.

              What I'm describing in the lower portion of my last post is a way to set up a relationship so that you match to a range of dates, not just one specific date or a list of dates in a text field. This method may or may not be useful to you. Depending on the design of your database system though, it might eliminate the need to edit this field manually.