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?
Solved! Go to Solution.
Declaring alfresco type as d:double should do the trick.I think
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.
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
Declaring alfresco type as d:double should do the trick.I think
I just changed alfresco to double and ephesoft to double and it works thanks
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.