And what is the auto-enter calc that is returning a "?" ?
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.
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.
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.)
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!
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.