6 Replies Latest reply on Jul 25, 2013 11:03 PM by philmodjunk

    auto-enter calc TIME OUT?



      auto-enter calc TIME OUT?


           I have an auto-enter calculation setup on a field that appears to be working completely fine on all machines but one.  Has anyone ever heard of auto-entre calculations breaking due to some sort of time-out?  I've used the users account on other machines and the function works fine, I've also logged in with the admin account on the trouble machine and I get a "?" just like with the other account that is normally used on the trouble machine.  So those two steps safely ruled out permissions issues.  The machine is running Mountain Lion and is a 13 inch macbook air, I thought the OS might be the problem but I have another user on a different machine that is also using Mountain Lion without any problems.  It is a newer macbook air though.

           Note I've done the most recent update and still get the the same question mark result.


           Any ideas?

        • 1. Re: auto-enter calc TIME OUT?

               And what is the auto-enter calc that is returning a "?" ?

          • 2. Re: auto-enter calc TIME OUT?


                 Case ( 
                 Vendor | PaymentTerms = "Vendor Invoice Terms" ; "" ;
                 Vendor | PaymentTerms  = "Immediately" ; GetNthRecord ( Days::Date ; 1 ) ;
                 GetNthRecord ( Days::Date ; Vendor | PaymentTerms )
                 The options to chose from are: Vendor Invoice Terms, Immediately, 10, 15 and 30.
            • 3. Re: auto-enter calc TIME OUT?

                   Well it looks like it wasn't just the one computer as I'm having issues with mine now as well.  Worked perfectly fine for me until now,  I'm getting the same results ("?") as the other computer ...  very confused.

              • 4. Re: auto-enter calc TIME OUT?

                     Better check your records and the context in which this evaluates. GetNthRecord will return a question mark if it attempts to reference data that does not exist.

                     Best guess is that the second GetNthRecord is looking for a record in Days::Date that does not exist. (Check the value in Vendor | PaymentTerms. If it is empty or zero, you'd get a ? result.)

                • 5. Re: auto-enter calc TIME OUT?

                       Hmmm I made a few changes and it seems to be working now.  I'm just not 100% sure how this would be the fix and how it would have caused it to only work on certain computer at a certain time.

                       You mentioned it looking for a record that didn't exist.  Didn't quite add up as what worked yesterday didn't work today but it did make me take a closer look at the relationship.  What I found was that one component of the relationship had a straight vertical line instead of the usual single or three prong line coming out of any relationship so I found this to be fishy.  I cracked open the field in question and it was a "constant" field where I created a calculation and marked it as "Weekday" but what was different was that the field was set to global for some reason.  I also was sure I had sorted the relationship but it wasn't so I did that and it now works.

                       Strange but happy it's working for the time being!

                  • 6. Re: auto-enter calc TIME OUT?

                         I don't think testing this on a different computer had anything to do with the results that you got. And the issues with your relationship that you found may or may not have any effect on the results either.

                         You are using GetNthRecord to access data from a set of related records in the Days table. GetNthRecord ( Days::Dates ; 1 ) Returns the value of Dates from the first such related record. GetNthRecord ( Days::Dates ; 5 ) returns the value of Dates from the 5th related record. You can imagine a portal to Dates and then this function is accessing different rows in that portal. If the number in that second parameter doesn't return a number that matches to any of the related records, you get a ? result. For example, if that imaginary portal only showed one record, GetNthRecord ( Days::Dates ; 5 ) will return a question mark.

                         Since your calculation uses GetNthRecord with the value in Vendor | PaymentTerms determining the number of the record from which to get this value, you have an expression that can work or fail at different times depending on the value returned by Vendor | PaymentTerms at the time that this expression evaluates. If it is empty, has zero or a number that is larger than the largest available record in your relationship to Days, you'll get a question mark. If it has a value that works to access a record in Dates, you don't get the question mark.