web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Insert and show decima...
Power Apps
Answered

Insert and show decimal number SQL Server

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Good afternoon,

 

I'm having some troubles while trying to use Patch to insert a decimal number into my SQL Database.

 

The data type of the field is "Numeric(18,2)", and I'd like to insert values like 0,05 or 0,50. Whenever I insert this values using Patch, I get the "Unknown Mashup Exception" error.

 

On the other side, if the input field is set to Text, it works because I use dot instead of comma (like 0.05), but the database saves only the number and forget the 0's. So for instance, 0.05 becomes a 5.

 

Is there any way to cast the format number so the database would save it instead of showing me this error?

 

Thanks in advance.

Categories:
I have the same question (0)
  • Verified answer
    v-micsh-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

     

    I just tested patching Numeric (18,2) field in SQL Server wihtin PowerApps, it works from my side.

    11.PNG

    Also tested with 0.05 and 0.50, all works.

    Thing you may give it a try:

    1. Take use of the value function:

    For example:

    Patch('[dbo].[Numeric]',Defaults('[dbo].[Numeric]'),{Id:3,Number:Value(TextInput1.Text)})

    If you would like to use the TextInput as the value input, then when use it under the patch for the Number field, add a value function.

    Regards,

    Michael

  • aow Profile Picture
    19 on at

    We have a field type decimal (18,1) in on-premises SQL and we have not luck using the patch function to update this column.

    Text fields work fine though. Any solution?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 481

#2
WarrenBelz Profile Picture

WarrenBelz 379 Most Valuable Professional

#3
11manish Profile Picture

11manish 291

Last 30 days Overall leaderboard