Preserving leading zeros in 4D archives
Keep all four positions
Copy four-digit results exactly as they appear on the original page, including any leading zeros. You can say a number aloud without pronouncing its leading zero, but in a result each position is part of a code. In a fictional example, 0715 and 715 should be recorded as different strings. The second has only three digits and could have been shortened during a file import. A spreadsheet treats 0715 as a quantity if you allow it to detect the type automatically, so it may display 715. Checking results calls for matching the original characters instead. In a table that contains draw numbers, prize digits and monetary amounts, keep the draw numbers and prize digits as text. The amounts can still use the spreadsheet's ordinary arithmetic features.
Run a small test before importing the full file
Select a few test values that cover one leading zero, two leading zeros and no leading zeros. You can use the fictional strings 0528, 0063 and 8714. These are examples for testing how an import works. Choose an import process that lets you assign the columns a type and set the results column to text. Examine the preview and verify all four characters in each row. After saving and reopening the file, use a plain text viewer to check that the zeros are still present in the file itself. Formatting can make a cell show a padded value on screen while another tool receives only 528 or 63. Comparing the visual presentation against the underlying value helps you find either kind of error before processing the archive.
Find the source if a zero has already disappeared
When a row has only three digits, mark it for review. Use the operator, draw date, product and prize tier to find the original announcement. Padding any short string with zeros can give an incomplete or unrelated code the appearance of a valid result. If the source confirms that it begins with a zero, restore the value exactly as shown and check adjacent rows added in the same import. If you cannot find the source, keep the entry separate from verified results and state that its length is incomplete. This tells other readers that it still needs checking. You can fill in the verified value later without losing the original finding that the import or transcription might have changed it.
Share digits in a format that survives the next import
Keep the prize label and all four digits together in an email or chat. If the recipient needs to paste them into a table, ask them to prepare a text column before pasting. Give a shared archive a field name that makes the intended length clear and include an example beginning with zero so readers can test their import. A validation rule can check that a verified entry contains exactly four decimal digits. Keep a pending status separate so the rule applies only to completed entries. A string consisting entirely of zeros can be a valid four-digit value and should not stand for a pending result. The final check is to compare the result against the source one character at a time, starting from the first position.



