Missing leading zero in numeric Android entry

Discussions about CSEntry
Post Reply
Keith Tomlin
Posts: 56
Joined: March 23rd, 2014, 9:30 am

Missing leading zero in numeric Android entry

Post by Keith Tomlin »

Hello there

I'm using 8 digit numeric fields to record my dates. The instruction to the field workers is always to enter the date in the format ddmmyyyy. Days which have only one digit (ie 8th January 2015) would therefore be entered as 08012015. However, I'm finding that the leading zero is not being saved in the Android version, even though the zero has been entered manually, and the zero fill option in the dictionary is answered as Yes. I don't have the same problem when testing data entry in Windows. Is there another setting that I should be changing on my Android tablet, or is this a known feature of the Android version? Retaining the leading zero would make the data easier to process because all of the dates would then have the same number of digits. (By the way, the dates are being recorded using the Ethiopian calendar, and so using a date-picker control is not an option).

Many thanks

Keith
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Missing leading zero in numeric Android entry

Post by josh »

I made a little test app to see if I could reproduce the issue you are having and the zero fill is working just fine. You can see my test app at https://www.dropbox.com/s/7w9jgck0ks0pd ... o.zip?dl=0

I'm using 6.0.4 (latest from Google Play as of today).
Keith Tomlin
Posts: 56
Joined: March 23rd, 2014, 9:30 am

Re: Missing leading zero in numeric Android entry

Post by Keith Tomlin »

Hi Josh

Thanks for your reply. I downloaded your test application onto my tablet but I'm afraid that also has the same problem - a number entered and saved as 05061965 is displayed as 5061965 when I return to the case. Might it therefore be to do with a setting on the tablet? I'm using a Samsung Galaxy 3 which has Android version 4.4.2, and I'm using CSPro version 6.0.4.

Many thanks

Keith
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Missing leading zero in numeric Android entry

Post by josh »

I've tested on a couple of Samsung tablets (Galaxy Tab 4 and Galaxy Tab 10.1). When you say that the leading zero is not retained are you saying that you don't see it when you view the data file in a text editor or export it to another package or are you saying that you don't see when you modify the case on the Android phone? I was assuming that you meant the former. If it is the latter then I can see the same behavior.
Keith Tomlin
Posts: 56
Joined: March 23rd, 2014, 9:30 am

Re: Missing leading zero in numeric Android entry

Post by Keith Tomlin »

Hi Josh - I meant the latter. The leading zeros are appearing as part of the data file when viewed in a text editor (which is good); but they are not appearing on the entry screen if I return to that field, either by closing the case and re-opening it, or by staying within the case and navigating back to the field. But as the field is numeric I'm hoping that this shouldn't make any difference to any logic that I write which relates to the field?

Thanks

Keith
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Missing leading zero in numeric Android entry

Post by josh »

It will make no difference in the logic. It is purely the way the value is displayed.

If you want the leading zeros displayed you could make the field an alpha and add the zeros in logic. I can help with that if you would like.6
Keith Tomlin
Posts: 56
Joined: March 23rd, 2014, 9:30 am

Re: Missing leading zero in numeric Android entry

Post by Keith Tomlin »

Hi Josh - thanks for the offer of help - however I need to keep these items as numeric because I'll be using the values for calcuations during data entry. But I'll let the fieldwork teams know that the numbers with leading zeros will have the zero missing if they return to the field (just in case they think they have made an error with data entry).

Thanks

Keith
Post Reply