Export to Primevara custom columns

Hi i want to export additonal columns to P6
I have a the Export server service

this is my P6 export config
case ‘primavera’:
ganttInstance.exportToPrimaveraP6({
config: {
$custom_data: {
HoursPerDay: 24,
MinutesPerDay: 1440,
hoursPerDay: 24,
},
duration_unit: ‘minute’,
},
name: ‘scheduler_ps6_’ + new Date().getTime() + ‘.xml’,
server: ganttCommonImportExportServer,
skip_circular_links: false,
tasks: {
ActualDuration: function (task) {
if (task.actual_start_date && task.actual_end_date) {
return task.planned_duration;
} else return 0;
},
ActualEnd: function (task) {
return task.actual_end_date || null;
},
ActualStart: function (task) {
return task.actual_start_date || null;
},
},
worktime: {
dates: {
0: true,
1: true,
2: true,
3: true,
4: true,
5: true,
6: true,
},
hours: [0, 24],
minutes: null,
},
});
break;

this is my task schema

{
“id”: “08767979-d0fd-4328-81c5-c3ca8f70bee4”,
“created_at”: “2024-02-01T07:35:05.555Z”,
“last_updated_at”: “2024-02-08T14:33:01.521Z”,
“created_by”: {
“id”: “656ce42a-b1e3-4eb2-a485-2289e6ef86f0”,
“mail”: “admin@maximl.com”,
“name”: “Admin”
},
“last_updated_by”: {
“id”: “656ce42a-b1e3-4eb2-a485-2289e6ef86f0”,
“mail”: “admin@maximl.com”,
“name”: “Admin”
},
“puid”: “40beff0b-f091-4275-99dc-4da796b33d9b”,
“sourceId”: null,
“source”: “Scheduler”,
“text”: “12345678”,
“type”: “project”,
“start_date”: “2024-02-10T14:33:00.000Z”,
“duration”: 20161,
“planned_duration”: 15839,
“progress”: 0,
“sortorder”: 0,
“end_date”: “2024-02-24T14:34:00.000Z”,
“ancestors”: [
null
],
“root_project_id”: “08767979-d0fd-4328-81c5-c3ca8f70bee4”,
“parent_folders”: [
“9797068b-d677-4da1-894d-2e18175314f4”
],
“users”: [],
“priority”: 1,
“status”: “Not Started”,
“custom_fields”: [],
“projectId”: “a79fff24-9a98-4c08-879c-567222fe3fd5”,
“template”: {},
“job_started”: false,
“integration_output”: {},
“actual_start_date”: null,
“actual_end_date”: null,
“baseline_1_start_date”: “2024-02-05T06:49:13.414Z”,
“baseline_1_end_date”: “2024-02-16T06:49:13.414Z”,
“baseline_1_duration”: 15839,
“baseline_2_start_date”: null,
“baseline_2_end_date”: null,
“baseline_2_duration”: null,
“baseline_3_start_date”: null,
“baseline_3_end_date”: null,
“baseline_3_duration”: null,
“baseline_4_start_date”: null,
“baseline_4_end_date”: null,
“baseline_4_duration”: null,
“baseline_5_start_date”: null,
“baseline_5_end_date”: null,
“baseline_5_duration”: null,
“baseline_6_start_date”: null,
“baseline_6_end_date”: null,
“baseline_6_duration”: null,
“baseline_7_start_date”: null,
“baseline_7_end_date”: null,
“baseline_7_duration”: null,
“baseline_8_start_date”: null,
“baseline_8_end_date”: null,
“baseline_8_duration”: null,
“baseline_9_start_date”: null,
“baseline_9_end_date”: null,
“baseline_9_duration”: null,
“baseline_10_start_date”: null,
“baseline_10_end_date”: null,
“baseline_10_duration”: null,
“early_start_date”: “2024-02-05T06:49:13.414Z”,
“early_finish_date”: “2024-02-16T06:49:13.414Z”,
“planned_start_date”: “2024-02-05T06:49:13.414Z”,
“planned_end_date”: “2024-02-16T06:49:13.414Z”,
“delay”: -22279,
“slack”: 0,
“prev”: null,
“next”: null,
“asset_id”: null,
“departmentId”: null,
“vendorId”: null,
“calendar_id”: “cf47bbe0-1b06-4528-9da8-8094953cd146”,
“parent”: null
}

please suggest me any ways to do it

Hello,
You can specify custom properties in the tasks object of the export function:
https://docs.dhtmlx.com/gantt/desktop__export_primavera.html#:~:text=tasks%20-%20(object)%20allows%20setting%20custom%20properties%20to%20the%20exported%20task%20items

Some custom properties won’t be exported.

Here is the list of the supported properties:
https://docs.dhtmlx.com/gantt/desktop__properties.html#tasksproperties

In the future, the dev team will add support for more properties in the export function, but I cannot give you any ETA.

I see that you already export the data with some custom properties, so you should know how to do that. You just need to add the properties you want and specify the function for them.
Here is an example:

gantt.exportToPrimaveraP6({
    skip_circular_links: false,
    tasks: {
        'ActualStart': function (task) {
            return task.start_date;
        },
        'baseline_1_start_date': function (task) {
            return 'Custom value';
        },
        'job_started': 'My Custom value'
    }

})

Here is the snippet:
https://snippet.dhtmlx.com/clcn37kz