You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

How to export only selected columns in Using the Export Capability in Headless Mode

Summary:

How to export only selected columns in Using the Export Capability in Headless Mode

Content (required):

Hi,

I am using export in progmatic way which is working perfectly fine. But I am not able to control the columns I want to export. As of now all the columns are getting exported. I do not want to change the ORDS query as it is being user at other places also.


Version (include the version you are using, if applicable):

2210

Code Snippet (add any code snippets that support your topic, if applicable):

PageModule.prototype.doExport = function(dataSource, workingAreaId){
   let columnsArray= [{"field":"emp_name","headerText":"Emp Name"},
                      {"field":"id","headerText":"Emp Id"}
                     ] ;
    var tempElement = document.getElementById(workingAreaId);
   exporter.export(dataSource, tempElement,true,columnsArray,"Emp.csv");
  };

/* It still exports all the columns of Emp ADP */

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!