Sharepoint form footer formatting – decimal/thousand separators
I’m using the following formating code to insert a hyperlink at the footer of a Sharepoint form:
“children”: [
{
“elmType”: “a”,
“txtContent”: “Click here to see the updated US Dollar exchange rate (will open in new window)”,
“attributes”: {
“target”: “_blank”,
“href”: “=’https://www.google.com/search?q=’+Number([$Course_x0020_Fee])+’+’+substring([$Currency],0,3)+’+to+USD'”,
“class”: “ms-fontColor-themePrimary ms-borderColor-themePrimary ms-fontWeight-semibold ms-fontSize-m ms-fontColor-neutralSecondary–hover ms-bgColor-themeLight–hover”
}
}
]
The problem is if the user uses a thousand separator in the $Course_x0020_Fee field, in Brazil we use the dot (.) as a thousand separator instead of the comma (,).
For example, if the user enters the amount of one thousand five hundred Brazilian Reais, he/she could write “1.500”. In this case, the link looks like this: https://www.google.com/search?q=1.5+BRL+to+USD
In other words, the dot is interpreted as a decimal separator instead of a thousand separator.
If the user uses a decimal separator, for example five hundred Brazilian Reais and fifty cents, he/she could write “500,50”, and then the link looks like this: https://www.google.com/search?q=50050+BRL+to+USD
In other words, the comma is ignored because it is interpreted as a thousand separator.
Is there a formula that can be used in the link formatting to interpret these separators correctly, depending on the formatting used in the user’s country?
I’m using the following formating code to insert a hyperlink at the footer of a Sharepoint form: “children”: [
{
“elmType”: “a”,
“txtContent”: “Click here to see the updated US Dollar exchange rate (will open in new window)”,
“attributes”: {
“target”: “_blank”,
“href”: “=’https://www.google.com/search?q=’+Number([$Course_x0020_Fee])+’+’+substring([$Currency],0,3)+’+to+USD'”,
“class”: “ms-fontColor-themePrimary ms-borderColor-themePrimary ms-fontWeight-semibold ms-fontSize-m ms-fontColor-neutralSecondary–hover ms-bgColor-themeLight–hover”
}
}
] The problem is if the user uses a thousand separator in the $Course_x0020_Fee field, in Brazil we use the dot (.) as a thousand separator instead of the comma (,).For example, if the user enters the amount of one thousand five hundred Brazilian Reais, he/she could write “1.500”. In this case, the link looks like this: https://www.google.com/search?q=1.5+BRL+to+USDIn other words, the dot is interpreted as a decimal separator instead of a thousand separator.If the user uses a decimal separator, for example five hundred Brazilian Reais and fifty cents, he/she could write “500,50”, and then the link looks like this: https://www.google.com/search?q=50050+BRL+to+USD In other words, the comma is ignored because it is interpreted as a thousand separator. Is there a formula that can be used in the link formatting to interpret these separators correctly, depending on the formatting used in the user’s country? Read More