March 28, 20169 yr So I'm confused on a calculation , I'm not sure if I should use a substitute calculation for what I'm trying to do or how to use that calculation by formatting a unformatted number; Example Unformatted Number 21100 Example Formatted Number 02-1100 So I need to add a "0" in front of the number and then always separate the first two numbers with a "-" the numbers be hide the "-" could be 1 or 20 numbers Ideas?
March 28, 20169 yr "0" & Left ( Table::number ; 1 ) & "-" & Right ( Table::number ; Length ( Table::number ) - 1 )
March 28, 20169 yr 1 hour ago, WSaxton said: Example Unformatted Number 21100 The example is ambiguous - it would be preferable to state a rule first, then give examples. For example, will the given number always have exactly 5 digits? If not, what is the expected answer in each case? --- If I am guessing correctly, you want to do: SerialIncrement ( "00" ; Div ( Number ; 10000 ) ) & SerialIncrement ( "-0000" ; Mod ( Number ; 10000 ) ) which would format: 1 as "00-0001"; 12 as "00-0012"; 123 as "00-0123"; 1234 as "00-1234"; 12345 as "01-2345"; 123456 as "12-3456"; 1234567 as "123-4567". Edited March 28, 20169 yr by comment
March 28, 20169 yr And if there is always a dash (in the middle) then it truly is not a number so the result calculation should be text. In fact, I would ask the purpose of this number? Is it from an export from external source? I ask because it might be best to auto-enter the correct format to begin with or use OnObjectValidate to assist/force the User in formatting it. Edited March 28, 20169 yr by LaRetta
Create an account or sign in to comment