Solved

use comma instead of point

  • 8 September 2020
  • 21 replies
  • 337 views

Userlevel 5
Badge +12

Hi,

for the entire app we use a lot of fields with values with a comma. However, TW by defaults uses a point. 

Now this is not too bad for our friends in the us of a. But here in Europe, I would very much like to offer a comma in values. 

Is this possible? 

It is needed for money, size, weight, etc. 

 

icon

Best answer by Mark Jongeling 4 November 2020, 13:10

View original

21 replies

Userlevel 7
Badge +23

Hi,

For that you can make use of the Domain control 'Numeric (thousands separator)’. This will cause the dot to be a comma. Only if the number is > 1000, then it will be 1.000,00 for example.

*This does make it so the field(s) will always use a comma over a dot.

Hope this answers your question!,

Mark Jongeling

Userlevel 5
Badge +12

thnx for superquick reply. 

I set the Domain to Numeric, with 10/2 as length. The control with 'Numeric?thousand separator’ 

and look: 

The exact opposite of what I want:) 

 

Secondly, can this be set somehow per user? For our app is used both in EU and US. And we would like to accommodate all. 

thnx!  

Userlevel 7
Badge +23

It might be dependent on your WIndows settings. If you use US dates in Windows, the GUI will use that too. And it could means that due to that your numbers are the American way.

There's an Extended property called UseWindowsCulture (https://docs.thinkwisesoftware.com/docs/sf/extended_properties.html) which 'Uses the region and language settings of the operating system (Windows) for displaying and editing values instead of the settings derived from the application language ID from the meta source. (Dates, times, numbers etc.)’

Maybe that is turned off. You can try out turning it On and see what happens :wink:

Userlevel 5
Badge +12

I've tried with both Yes/No settings in the UseWindows and with several pc's. Also on web gui and local app. However, still the opposite of what I want. Weird… 

Another though on this? 

Note: Date settings are picked up and correct: DD:MM:YYYY 

Userlevel 7
Badge +23

Maybe this could be an answer:

https://answers.microsoft.com/en-us/msoffice/forum/msoffice_word-mso_win10-mso_365hp/changing-decimal-separator-from-comma-to-dot/953556fb-00d0-45ad-bd4f-6ca8afa5025a

Windows 10

In Windows the separator can be changed. Let me know if this does the trick!

Userlevel 5
Badge +12

Everday day we learn. Never knew this could be set. 

BUT! For my local app it was set correct, but does not effect in the local app. So, no changes. 

 

Userlevel 7
Badge +23

For extra context, what datatype does your field(s) have and (if they do) what domain control are you using? 

Userlevel 5
Badge +12

the domain on the field I'm testing now is: 

  • Data type; Numeric 
  • Length: 15 - 2 
  • Database type: numeric(15, 2)
  • Control: Numeric (thousands separator)
Userlevel 7
Badge +23

Hi Blommetje,

I just heard (credits to @Erik Brink) you can use the extender 'custom_display_format’. There you can connect it to a domain and use a format for that domain. The display format in your case should be:

#.0,##

In SF:

The domain will now be shown with dots for thousands and comma as decimal separator. The format only works for the List.

I hope this solves it for you!

Kind regards, 
Mark Jongeling

Userlevel 5
Badge +12

What do you mean with the last sentence “only for the List” ?

Userlevel 7
Badge +23

What do you mean with the last sentence “only for the List” ?

That it only works in the List, not in Forms. 

Userlevel 5
Badge +12

Not in forms? I don’t know what a List is, never used it. I have a form want when my users enters a value (Cost in this case) I want the value to be displayed properly. 

 

Userlevel 7
Badge +23

Not in forms? I don’t know what a List is, never used it. I have a form want when my users enters a value (Cost in this case) I want the value to be displayed properly. 

 

Maybe Grid is a better name to use. If possible, you can try the extender out and see if it gives the desired result. I will also try tomorrow in a testing environment. 

Userlevel 7
Badge +23

Hi Blommetje,

In my test I didn't get the desired results with the previous format I mentioned in my reply. I did get a good result by using the following format:

0,0.00

The format entered in the SF at Full model → Extenders
The result - [numeric_two_decimal_extender]

I believe this is the result you are looking for. To be sure, test this in your environment and let us know here.

Kind regards,
Mark Jongeling

Userlevel 5
Badge +12

Hi Mark, 

this is what I need indeed! However, I do not get it working here at the time. 

I’ve disabled UseWindowsCulture in Extended Props. I do have a Control on the Domain with “thousand separator” and it’s a Numeric (15/2) type. (Turning the Separator on/off makes no difference). 

This is set in the Extender: 

 

However,the result is no what I always had: 

 

The exact opposite of comma/point . 

I do think you have it working well, so clearly i’m missing something...

 

Userlevel 7
Badge +23

Well, my default settings are thousand separated by dots and decimals by comma. I couldn't get it a different way either. I will communicate this within Thinkwise, hopefully someone can give the perfect answer.

Userlevel 5
Badge +12

I checked my windows settings which are comma for decimals/ dot for thousands as well. So should be the same. 

 

Perhaps someone can shine a final light on it with the final solution.

Thanks a lot for thinking along anyway! 

 

Userlevel 5
Badge +12

@Mark Jongeling  

When should the field for "Domain” appear? I tried some more with this, but for some reason this Domain entry field does not show. 

Userlevel 7
Badge +23

That is strange, it should be there. The 'Value’ field is shown on the basis of the Value type. 

Otherwise, can you recreate the extender and see if that fixes it?

Userlevel 5
Badge +12

hmm, strange. 
I added it all, but the domain field is not showing. 

The issue is in my branch, and my co-workers. 
It should just appear 'magically’ ?

Userlevel 7
Badge +23

Can you make sure there's no filtering active?

Otherwise try this:

SELECT *
FROM [your_sf_database_name].[dbo].[extender_property]

Here it should return all properties of extenders you have. 

 

Reply