Page 1 of 1

Auto-format numeric fields with commas during data entry

Posted: March 26th, 2019, 1:44 am
by mogwal
Hi all. Is there a way to format a numeric field in such a way that when the data collector using android is entering data, the values are automatically separated with commas. This is because I found challenges with data collectors over entering figures e.g. instead of 5000000 (five million), someone can easily enter 50000000 (fifty million). But if automated with comma, they would enter the proper 5,000,000.

Thanks,
Martin

Re: Auto-format numeric fields with commas during data entry

Posted: March 26th, 2019, 7:00 am
by Gregory Martin
Unfortunately there is no way to do this with the current version of CSEntry. You could consider showing a warning screen afterwards, with the value separated with commas, so that the enumerator can confirm their entry.

Re: Auto-format numeric fields with commas during data entry

Posted: March 28th, 2019, 8:45 am
by romi237
Thank For the idea.

In future version can we have a function as regexmatch for that?

Re: Auto-format numeric fields with commas during data entry

Posted: March 28th, 2019, 8:57 pm
by htuser
Dear Romi,
Manies requested functions, functionalities and features are already solved in C/C++.
CSPro Programming Language (CPL) is the same family as old C. Also, the CSPro Engine
is written in C/C++. So, it's better to ask the developer Team to open CSPro logic to
C/C++.
By example the feature you request now are already discussed , and, solved:
http://www.cplusplus.com/forum/beginner/24707/
http://www.cplusplus.com/forum/beginner/215134/
http://www.cplusplus.com/forum/beginner/75199/
https://www.daniweb.com/programming/sof ... and-number
https://stackoverflow.com/questions/356 ... mbers-in-c
You would only import this in your logic.

Greg, what do you think about?
Right now, in CSPro Logic, it's very easy to do this in postproc, in a string item:
a)Edit to change numeric to string (http://www.csprousers.org/help/CSPro/edit_function.html)
b) substring (http://www.csprousers.org/help/CSPro/su ... sions.html)


Best Regards,