I have this function:
Patch('[dbo].[articulosXpres]'; Defaults('[dbo].[articulosXpres]'); {desc:DataCardValue14.Text};{id_art:BrowseGallery2.Selected.num_art};{premillar:Value(TextInput4.Text)};{cant_art:Value(TextInput2.Text)};{id_pres: BrowseGallery1.Selected.n_presu});;Navigate(listar_articulo; ScreenTransition.Fade)
When I want to save it to the database it shows me an error saying:
This error is because premillar is decimal and does not take numbers with a comma. How can I do to be able to save it with the price that appears in image in my table dbo?
PD: The whole patch function works well less premillar than I do not pass the corresponding value
Hi jdelacrettaz,
I assume you could use Text function to format the decimal number as Text(Decimal,"[$-en-US]$###,##").
About Text function, please see this documentation for a reference:
https://powerapps.microsoft.com/en-us/tutorials/function-text/
To test this issue, I create an app looks like below. The Patch function I am using is:
Patch('[dbo].[a2]',Defaults('[dbo].[a2]'),{id:Value(TextInput1.Text),name:TextInput2.Text,Decimal:Value(TextInput3.Text)})
Then on the Gallery screen, configure the Text property for the Decimal column as: Text(Decimal,"[$-en-US]$###,##")
Then the value patched by the button will be shown as “$14,623” on the Gallery screen. Looks like below:
Hope it could be a reference for you. Please feel free reply if you need more help.
Best regards,
Mabel Mao
Thanks for the answer, but it does not help me, since what I want to save is the number 712,14 in the column premillar and does not leave me for the error that throws me, if I keep it as 712.14 lets me save it, but in the column Premillar guard me 71214 and when I show it in the browsgallery I can not make it show me 712.14. How can I fix it?
What I have to show is a price and it is important that I show 714,14 since after that a sum of everything is done and shows the final price.
I hope someone can help me solve this problem
thanks you!!
User | Count |
---|---|
159 | |
95 | |
76 | |
72 | |
58 |
User | Count |
---|---|
214 | |
165 | |
97 | |
95 | |
74 |