January 31, 200521 yr I'm making a layout for logging my video tapes using timecode ins and outs for my clips. I want to simply type in 8 numerical digits and have FileMaker put a colon in the number after every two digits, so I don't have to type the colons in by hand after every 2 time code digits. I've tried every combination of settings that I could think of in the field options panel etc. I found a layout online, but it required me to type the number in one window, and then it put the number with the colons in another window. I'd like to type the number in, and in same window put colons after every 2 digits when I tab out of the box. Is this doable and can I get pointed in the right direction? Thanks, R
January 31, 200521 yr Set your input field to Auto-enter the following calculation, and uncheck the Do not replace value.. option. This also enters the leading zeros automatically. Let ( [ tc = Right ( "00000000" & GetAsNumber ( [color:"red"]yourFieldNameHere[/color] ) ; 8 ) ; hh = Middle ( tc ; 1 ; 2 ) ; mm = Middle ( tc ; 3 ; 2 ) ; ss = Middle ( tc ; 5 ; 2 ) ; ff = Middle ( tc ; 7 ; 2 ) ; d= 0 ] ; hh & ":" & mm & ":" & ss & ":" & ff )
January 31, 200521 yr There is no performance advantage to using Let for the hh, mm, ss, and ffs here since each is only referenced once in the calculation. It does make it cleaner-looking though. But what exactly is the unused d variable?
January 31, 200521 yr And the hh, mm, ss, and ff variables will come in handy when the next question is about validating.
February 1, 200521 yr Author Comment, Thanks for the valuable info. Some questions still. Where do I set my input field to auto at? Where can I find the "Do not replace value" check box? What type of field do I select as my Time Code in and out boxes? Thanks, R
February 1, 200521 yr File > Define > Database.. > Fields Define your "boxes" as Text type. Under Options/Auto-Enter, select Calculated value.. and paste the formula. Uncheck the Do not replace value.. option.
February 1, 200521 yr Author Comment, Thanks again. It makes perfect sense now that I know how to do it. R
Create an account or sign in to comment