Developer forum

Forum » CMS - Standard features » Custom fields in export via export users

Custom fields in export via export users

Nicole Busscher
Reply

Hi, we have some custom fields at a user and we would like to add these custom fields to the export. Does anyone know if this is possible?

Export.png Overview_custom_fields.png

Replies

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Nicole,
you can edit the xml file to include your custom fields manually. It is located in the path:
Files\System\Integration\Jobs\ModuleSpecificJobs\UserManagementModuleJobs\ExportJobs\ExportUsersWithSelectedColumns.xml
You will need to add the custom fields to SourceProvider schema, Destination provider schema and mappings sections in this xml file.

The other way doing that is to copy yours Files\System\Integration\Jobs\ModuleSpecificJobs\UserManagementModuleJobs\ExportJobs\ExportUsersWithSelectedColumns.xml
to the folder: Files\Files\Integration\jobs and open the "ExportUsersWithSelectedColumns" job from the Settings->integration->Data integration module and click the button
"Check tables schema" and save the job and then click "Add source table to destination" button on the left side of "AccessUser-AccessUser" table mappings - that will update your job with all available fields in AccessUser and after that save the job and copy it back to Files\System\Integration\Jobs\ModuleSpecificJobs\UserManagementModuleJobs\ExportJobs folder.

Regards, Dmitrij

 
Gerard Kocks
Gerard Kocks
Reply

Hello Dmitrij,

I am trying to realize this for my colleague Nicole, I choose the second way. But after copying the XML file to Files\Files\Integration\jobs it is not visible in Settings->integration->Data integration (see screenshot). Can you tell me what I am doing wrong?

Best regards
Gerard

Data_integration.png
 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply
This post has been marked as an answer

Hi Gerard,
that is because your xml file is in Unicode while your xml declaration in is set to utf-16.

Try removing the conflicting encoding from the XML declaration. Replace

<?xml version="1.0" encoding="utf-16"?>

with

<?xml version="1.0"?>

Regards, Dmitrij

Votes for this answer: 2
 
Nicole Busscher
Reply

Hi Dmitriy, thanks for you help! It works now! :)

Regards, Nicole

 
Adrian Juell
Reply

Hey,

We have the same request, but I am not able to locate the file 'ExportUsersWithSelectedColumns' in the 'Files' section for the customer in question. 

Does anyone know if this has been moved or if its handled differently in newer versions of DW9? This customer is running DW9.16.

 

Regards,

Adrian

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi Adrian

You can find a version here:

https://github.com/dynamicweb/Swift/tree/main/Swift/Files/System/Integration/Jobs/ModuleSpecificJobs/UserManagementModuleJobs/ExportJobs

and I added one zipped.

Hope this will do it for you.

 
Adrian Juell
Reply

Thank  you Nicolai! :) 

Can I then just add this to the repository Files -> Files/Integration/... somewhere after I have altered the file to my needs? (I would guess the Integration/Output folder)
How does DW know which file to use when doing the actual export, as I have no way of chosing a file in that view?

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Adrian,

yes, you can edit the file before using it, so you need to copy the files to the: "/Files/System/Integration/Jobs/ModuleSpecificJobs/UserManagementModuleJobs/ExportJobs" folder.
Then they will be shown in the "Export users activity" drop-down with a label that is equal to the file name (without .xml extension) so you can choose the one that you need.
BR, Dmitrij

 
Adrian Juell
Reply

Thanks, but if that folder structure does not exist, can I just create it ? 

I have checked several different of our customer environments, and noone has these folders as standard.

br,

Adrian

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Sure, just create the folder structure.

Wether you have it or not depends on what files was on your initial installation.

 

You must be logged in to post in the forum