November 13, 200916 yr I hope that this should be easy. I need to find out if I can have a certain field automatically file in the date format I need. When we open a sort (say today) it goes 00220091112KA This is broken down by 00220 (Our Location number which never changes) 09 (year) 11 (month) 12 (day) K (never changes) A (starting at A and ending on which letter we are on for that night). When I go to put a project into the system I enter the date in the date field 11/12/09 and the project number automatically populates 00220 I would have to fill in the rest of the numbers 091112KA. I would like it when I put in the date it automatically puts 0022091112K Which i would just put A or B or C depending on which project we are on for that day. Any advice or am I just stuck with it putting 00220?
November 13, 200916 yr As long as you have the project letter ("A") in a field somewhere, no problem. Use the following calculation in a field or script step: "00220" & right(year(get(currentdate)),2) & month(get(currentdate)) & day(get(currentdate)) & "K" & currentProjectLetter That should do it. A tip if you want leading zeroes in your month and day parts, replace: day(get(currentdate)) with right ( "0" & day(get(currentdate)) ; 2 ) Hope that helps. Would be interested to know what you need it for ie the wider context. James
November 13, 200916 yr Author This is how we do our job numbers. Like tomorrow (11/13/09) would start out new with 00220091113KA If we get two jobs tomorrow the next project would be 00220091113KB and so on. And that worked! Thank you! Edited November 13, 200916 yr by Guest
Create an account or sign in to comment