Grouping of characters can be achieved through locale configuration in the Environment tab i.e. Document() view. The digit grouping symbols should be a space character or a comma. This requires the data type to be a number. If you need the input data to be a String data type, you can store it in a Number variable, where it will cast from String to a Number and apply the Number formatting applied in the Locale.
On top of the Locale configuration of Digit Grouping Symbol using space character or comma, there are other settings required to configure which are as follow:
Under the Format, ensure that "Include Thousands Separator" is checked.
Under Document properties, ensure that the Locale in question is added to the list of "Supported Language".
Highlight the paragraph containing the Number data field, and select the correct Locale under the Language Selection drop-down at the top taskbar.
On Data Format, please make sure that the Locale for the Number field is set to the correct Locale.
UPDATED: July 31, 2019