Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Microsoft Dataverse
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.  

 

  • SeeSide Profile Picture
    15 on at
    Re: Difficulty storing data of type Currency in CDS entity

    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

  • Verified answer
    v-siky-msft Profile Picture
    on at
    Re: Difficulty storing data of type Currency in CDS entity

    @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

     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Microsoft Dataverse

#1
stampcoin Profile Picture

stampcoin 15

#2
ankit_singhal Profile Picture

ankit_singhal 11 Super User 2025 Season 1

#3
mmbr1606 Profile Picture

mmbr1606 9 Super User 2025 Season 1

Overall leaderboard

Featured topics