5

I am trying to export numeric field where it has more than 8 digits. In the export data is in invalid format.

The data represented is in the Scientific notation. There is no way to convert or format the field while extracting, as SOQL has limitations.

However if the no of digits in the numeric fields are less than 8 the data export is perfectly fine.

Any workaround for this to extract that field value correctly.

Note: I cannot make any new field in SF or data type change for the current field.

2
  • How are you extracting the data?
    – Mike Chale
    Commented Sep 25, 2013 at 19:16
  • I extracted Data using Apex DL, Jitterbit, Dataloader.io . All of them return same format. i think it is a limitation with Salesforce. thought of posting here it might be some other issue not sure
    – GirishP
    Commented Sep 25, 2013 at 19:21

2 Answers 2

0

You could make a VF page to create the export file if standard methods aren't working. You just need to know what format do you want to the export to be. Have something like:

<apex:page ... contentType="the MIME of export format">

Example: To export a CSV:

<apex:page ... contentType="text/csv#{!FileName}.csv">

Or for an Excel file:

<apex:page ... contentType="application/vnd.ms-excel#{!excelFileName_withXlsSuffix}">

Also, check out the Decimal instance methods that might help converting the number to the desired format:

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_System_Decimal_instance_methods.htm

1
  • This might had helped. but this solution does not fit in the requirement. I just need to use data loader and export it into some other data base
    – GirishP
    Commented Sep 25, 2013 at 19:25
0

This is the problem with the Salesforce which automatically converts 8 digits into exponential notation while extracting the numeric fields out of the Salesforce using some data load utility. I was extracting the Numeric field with 8 or more digit but it always retieves the numeric fields as exponetial form.

Example: SF Numeric field Value= 123456789 while extracting this fields Value returned = 1.23E+08(Incorrect)

I tested this with every data laoder i.e. either Apex DL, Jitterbit or dataloader.io it was returning the same value. Than i figured it out that the SF always converts the value that have 8 or more digits it converts in exponential format.

My Problem Was: I needed the exact values as that in salesforce. What i did was I explicitly convert the Data values inside the database where i was storing the values. and do the neecesary processing.

2
  • 1
    Did this solve your problem? it's not clear from the answer, can you elaborate more please?
    – Saariko
    Commented Oct 10, 2013 at 5:31
  • Explained more to make it more clear. :) yes i solved the problem the way i mentioned in the baove answer. :) explicit conversion.
    – GirishP
    Commented Oct 10, 2013 at 6:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .