February 2, 200521 yr What could cause : Seconds( Get( CurrentTime) ) to return a "?" on either OSX or windows xp and filemaker 7?
February 2, 200521 yr It is probably a very very large number. Click in the field where the "?" appears, and see if a number turns up. -Stanley
February 2, 200521 yr Actually, I take that back. For some reason I thought it would return a gigantic number from the system clock (date converted into seconds). You're probably just looking at a formatting error. -Stanley
February 2, 200521 yr Author I'm actually using it in a calculation for a text field that is part of captKurt's Unique Auto-entered Primary Key IDs v2.1 (http://www.fmforums.com/threads/showflat.php?Cat=0&Number=100135&page=0&vc=1#Post100135). The code as I'm using it is: Right( "000000" & Status(CurrentRecordID); 6) & Middle("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; Round(Random*35;1); 1) & Right( "00000" & Hour ( Get ( CurrentTime ) ) & Minute ( Get ( CurrentTime ) & Seconds ( Get ( CurrentTime ) ) ); 6 ) & Middle( "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; Round(Random*35;1); 1) & Right( "00000" & Month ( Get ( CurrentDate ) ) & Day ( Get ( CurrentDate ) ) & Year ( Get ( CurrentDate ) ); 6 ) & Middle( "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; Round(Random*35;1); 1) And it's putting in a "?" in the 20 digit keys that it generates.
February 2, 200521 yr You have both pre-7 and 7 function calls in your code, so I'll assume you meant Get(RecordID). If you click in the field, does it display correctly? It could be that the field is not formatted to display enough characters.
February 2, 200521 yr Author The field is large enough... it's not a truncation issue due to field size on the layout. I'm getting keys like: 000681B00015?12220051 The "?" is always the 13th digit. I was guessing it's because of the Seconds(Get(CurrentTime)) portion of that middle set of 6 in the calculation code.
February 2, 200521 yr Ah, you are missing a closing parens after Minute(Get(CurrentTime) and have an extra one before "; 6" that needs to be removed. In its current state you are concatenating the current time with seconds and taking the minute result of the concatenation, which is probably nonexistent.
February 2, 200521 yr Author That would do it, i noticed the missing ")" after the minute thing, but couldn't see where the extra one was. The weird part is that not all of the keys generated with that method have the "?" in them and I didn't make any changes to the script when i implemented it.
Create an account or sign in to comment