February 25, 20223 yr May I ask, I'm making database with ID, DATE and NAME, but I want if I input DATE for example day(2digit),month(2digit)and year(4digit) and I enter it will be automatic in the ID it say year(4digit)month(2digit)day(2digit) and there is 0001 behind day. for example date:25-02-2022 if I enter the ID must be like 20220225-0001 it will be like that and automatically sequentially. sorry if my English is not good. I'm Dedy from Jakarta, Indonesia
February 25, 20223 yr 8 hours ago, D3D1 said: if I enter the ID must be like 20220225-0001 it will be like that and automatically sequentially. I don't understand this part. If you want sequential ID, then you (as the user) cannot be entering your own. Also, it's not clear what exactly "sequential" means here. Do you want to restart the sequence at the beginning of each day? If so, you are looking at further complication, because Filemaker does not have a built-in mechanism for this. Is your solution hosted on FM Server?
February 26, 20223 yr Author if I press New Record and fill in the DATE column automatically in a written ID as I give the image. without to fill in ID manually. thank you dedy Untitled.fmp12
February 26, 20223 yr 56 minutes ago, Steve Martino said: Simple version The date part of your calculation does not distinguish between Jan 21 and Dec 1 (for example). The correct expression for a 6-digit YYMMDD result, as indicated in the question, would be: Right ( Year ( date ) ; 2 ) & SerialIncrement ( "00" ; Month ( date ) ) & SerialIncrement ( "00" ; Day ( date ) ) or, if you prefer: SerialIncrement ( "000000" ; 10^4 * Mod ( Year ( date ) ; 100 ) + 10^2 * Month ( date ) + Day ( date ) ) Edited February 26, 20223 yr by comment
February 27, 20223 yr 20 hours ago, comment said: The date part of your calculation does not distinguish between Jan 21 and Dec 1 (for example). The correct expression for a 6-digit YYMMDD result, as indicated in the question, would be: Right ( Year ( date ) ; 2 ) & SerialIncrement ( "00" ; Month ( date ) ) & SerialIncrement ( "00" ; Day ( date ) ) or, if you prefer: SerialIncrement ( "000000" ; 10^4 * Mod ( Year ( date ) ; 100 ) + 10^2 * Month ( date ) + Day ( date ) ) Nice!
March 1, 20223 yr Author what if from 2022 to 2023 but the id of the number 0001 is again like the beginning again, for example the id becomes 230101-0001
March 1, 20223 yr Then you will need to reset the serial number field at the beginning of each year: https://help.claris.com/en/pro-help/content/set-next-serial-value.html How you do that depends on whether your file is hosted - but when I asked, you didn't answer.
March 1, 20223 yr Author On 2/27/2022 at 1:06 AM, comment said: The date part of your calculation does not distinguish between Jan 21 and Dec 1 (for example). The correct expression for a 6-digit YYMMDD result, as indicated in the question, would be: Right ( Year ( date ) ; 2 ) & SerialIncrement ( "00" ; Month ( date ) ) & SerialIncrement ( "00" ; Day ( date ) ) or, if you prefer: SerialIncrement ( "000000" ; 10^4 * Mod ( Year ( date ) ; 100 ) + 10^2 * Month ( date ) + Day ( date ) ) I will try my best, thank for your help
Create an account or sign in to comment