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 / Difficulty storing dat...
Power Apps
Answered

Difficulty storing data of type Currency in CDS entity

(0) ShareShare
ReportReport
Posted on by 15

Hi there, 

 

I am trying to insert data into a field of type Currency in a CDS Entity from a canvas app and having no luck.  Seems like a simple thing to do but everything I try gives me one of the two following errors:

 

  • Incompatible Type. The 'Amount' column in the data source you're updating expects a 'Currency' type and you're using a 'Text' type.
  • Incompatible Type. The 'Amount' column in the data source you're updating expects a 'Currency' type and you're using a 'Number' type.

The data is being pulled from a table in the Canvas app, and the Amount field in the table is a custom field formatted as [$-en-US]$ #,###.00

 

I am using a collect statement to update the CDS entity as follows:

  • Collect ('Entity Name', {Amount: ItemTotal})  <- this will give me the error saying I am using a "Text" type

I've tried converting it to a number using

  • Collect ('Entity Name', {Amount: Value(ItemTotal,"[$-en-US]$ #,###.00")}) <- error saying I am using "Number" type

Why can't I store a number in a Currency field????  Seems so odd...

 

Any help is appreciated.  

 

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

    @SeeSide 

    Could you share more details about how to pull ItemTotal from a table? Could you share the example and screenshots?

    Please ensure the ItemTotal is a number value.

    I made a simple test, and the code can work well.

     

    Collect(yxyxies,{Price:200})

     

    or

     

     

    Collect(yxyxies,{Price:Value(Text("200","[$-en-US]$ #,###.00"))})

     

     

    If this doesn't make sense, please share more information, and the value of ItemTotal.

    Sik

     

  • SeeSide Profile Picture
    15 on at

    Thanks for your response.  The truth is there must have been something wrong when I was working on this last Friday.  I had tried both of the options you provide and both were throwing the errors.  

     

    Monday, I come back in and bingo they work.  I had left the code with the hard coded price -> Collect(yxyxies,{Price:200}) <- on Friday and it was error, which was driving me nuts as it definitely should have worked. Monday it did.  

     

    Later on Friday, everything completely crashed to the point where I couldn't even open my apps anymore.  

     

    So...  Thanks for your help, I'm glad to see that currency data types are working.

     

    Shaun

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 993

#2
Valantis Profile Picture

Valantis 675

#3
11manish Profile Picture

11manish 545

Last 30 days Overall leaderboard