Auto-format numeric fields with commas during data entry

Discussions about CSEntry
Forum rules
New release: CSPro 8.0
Post Reply
mogwal
Posts: 1
Joined: March 26th, 2019, 1:34 am

Auto-format numeric fields with commas during data entry

Post 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
Gregory Martin
Posts: 1777
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

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

Post 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.
romi237
Posts: 11
Joined: November 30th, 2018, 1:18 pm

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

Post by romi237 »

Thank For the idea.

In future version can we have a function as regexmatch for that?
htuser
Posts: 631
Joined: December 19th, 2011, 6:26 pm
Location: Silver Spring Area, MD, USA

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

Post 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,
G.VOLNY, a CSProuser from Haiti, since 2004
Post Reply