January 2, 200125 yr Newbies Hi Can anyone give me a plain text translation of the following statement from John Mark Osborne's Format.fp3 solution: Case(Mod Time, Serial, Serial)? Specifically, I am trying to figure out what it means in a case statement when the test condition does not contain a comparison operator (such as "Mod Time>12:00"). I read it as "If Mod Time has any value, insert the value for Serial into [the field being calculated]; if it doesn't have a value, do the same thing." I have adapted his solution for replacing unformatted (or incorrectly formatted) text with a formatted version (in my case, dates), but I need it to work on new records automatically. The key appears to be putting something in that test-condition other than a modification time-based trigger, since a new record doesn't have a "modify time." Thanks for any clarifications anyone can offer. ------------------
January 3, 200125 yr The first argument in a Case statement is evaluated as a boolean. It can be a comparison, A <= 5 which evaluates to a 1 or zero, true or false. It can also be a numeric field. Zero values in a numeric field are evaluated as "False" or zero, non-zero values are evaluated as "True" or one. The variable defined as: Case(Mod Time, Serial, Serial) would have the value of the field Serial regardless of whether Mod Time was True or False. John Mark is obviously using some trick here. Without more information to put this in context, I can't guess further. -bd
Create an account or sign in to comment