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:
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:
I've tried converting it to a number using
Why can't I store a number in a Currency field???? Seems so odd...
Any help is appreciated.
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
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
stampcoin
15
ankit_singhal
11
Super User 2025 Season 1
mmbr1606
9
Super User 2025 Season 1