--- title: "How to configure Export to file to export source fields" slug: "how-to-configure-export-to-export-source-fields" updated: 2025-03-20T14:12:56Z published: 2025-03-20T14:12:56Z canonical: "docs.datajet.app/how-to-configure-export-to-export-source-fields" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.datajet.app/llms.txt > Use this file to discover all available pages before exploring further. # How to configure Export to file to export source fields By default, when a project is created, the **Export To File** function in [Dataset Scratch](/v1/docs/dataset-scratch) will export the *displayed* data. However, it is possible to export the *underlying data codes* by selected the "Export Source Fields" option. ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/image-1741613050603.png) If using script, use the [Export](/v1/docs/export-1) method. ### Configuring a project to export source fields To set up a project to export data codes, the project property "alternateFieldNameSuffix" must first be configured in the project properties using [SetProjectProperties](/v1/docs/setprojectproperties). The following example tells the server to look for {FieldName}_source when exporting, and if it exists, to export in place of {FieldName} So if DataField1 is in the export field list and field DataField1_source exists in the table (Note that source fields are usually hidden), the column would be output with the header "DataField1" but with the contents of DataField1_source. ```json { "method": "SetProjectProperties", "project": "REGRESS_ExportSource_FULL", "alternateFieldNameSuffix": "_source" } ``` ### Verifying Export Configuration To verify whether or not a project has been configured to export source fields, use the following in runner: ```json { "method": "ReadMongo", "query":{"class":"BatProjectMarker"} } ``` Then check to see the "alternateFieldNameSuffix" property. This project has NOT been configured to export source data: ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/image-1741613537515.png) This project HAS been configured to export source data: ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/image-1741614886813.png) ### Sample Export #### Source fields NOT configured ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/image-1741614625027.png) #### Source fields configured: ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/image-1741614698048.png) ### Injecting Data When injecting data, be aware that the project properties of the package that is being injected will overwrite the existing project properties in the consumer project. This is so that metadata and campaign configuration associated with the package being injected (i.e., the properties present in the source project at the time the package was created) are automatically imported. If a package *without* source field configuration is injected into a project *with* source field configuration, the configuration will be removed. To offset this, call [SetProjectProperties](/v1/docs/setprojectproperties) again in the consumer project