12-04-2017 08:06 AM
Hello,
In ephesoft, I have an index field of data type float. I map it to an alfresco property of type d:float.
In ephesoft I manually enter the value 11.11 for the index field but in alfresco it gives me 11.1099995676.
What is the problem?
12-04-2017 10:04 AM
Declaring alfresco type as d:double should do the trick.I think
12-04-2017 09:05 AM
Must say nice catch..Now lets see the problem..
I am not sure which exact file is having the problem.I look at the code on below link.
CMIS example: Uploading multiple files to a CMIS repository | ECM Architect
and found that alfresco is using similar code like below to import float value in alfresco.
props.put("cmisbook:gpsLatitude", BigDecimal.valueOf(Float.parseFloat(lat)));
Now if you execute below code in normal java file.
String ni="11.11";
System.out.println(BigDecimal.valueOf(Float.parseFloat(ni)));
It will give output as 11.109999656677246.
12-04-2017 09:36 AM
What do you advise? I can't find any exact information on the data types in ephesoft. What the 11.11 represents is an amount of money. Maybe another datatype would be more interesting. I suppose that if I use a string datatype in ephesoft, and a string datatype in alfresco, there will be no "conversion". but I suppose I will also loose any possibility of doing calculations in alfresco.
PS: I am a real beginner I'm a mathematician doing a student job on alfresco and ephesoft and I'm a bit overwhelmed by all the programming aspects
12-04-2017 10:04 AM
Declaring alfresco type as d:double should do the trick.I think
12-04-2017 10:06 AM
I just changed alfresco to double and ephesoft to double and it works thanks
Explore our Alfresco products with the links below. Use labels to filter content by product module.