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.