Hi Everyone,
I am trying to create a new SP list item based on another item in another list using HTTP request.
My problem is with assigning a value to a number field. If the source field (also number type) has a value everything works fine but if the source field is empty then I get the following error:
"Cannot convert a primitive value to the expected type 'Edm.Double'. See the inner exception for more details."
First I thougth that the problem was the formula as I'm using double quotes around the value I'm trying to assign
but if I remove the double quotes I get a different error message:
"Invalid JSON. An unexpected comma was found in scope 'Property'. A comma is only valid between properties of an object or between elements of an array."
Then I tried converting the value to integer using an expression with int() function but that also didn't work.
"The template language function 'int' was invoked with a parameter that is not valid. The value cannot be converted to the target type."
Is there any soution to my problem besides setting 0 as the default value for the field or using Single line of text type instead of Number?
Thank you in advance.
Regards,
Peter