Export Set Pre Script

ant_niopires
Mega Contributor

Hi all,

I want to set a field existing in a table as a concatenation of two existing fields. I want to calculate this field at the export, meaning, by a pre-export script.

I was wondering how could i script this? In this scripting there is no 'current' field to use.

Any help is welcome.

Thank you!

3 REPLIES 3

Chris M3
Tera Guru

The pre-export script is simply a way to control the export set itself, not the data it is exporting.   An Export Set can only export fields defined in the definition, that exist on the table.



You could add a calculated field to the table, and put in the calculation, then it would be available for export.



Let me know if I misunderstood the issue.


Chris, thanks for your answer.



I believe you got it right.



So, it is not possible to access the data that we are exporting at all through the pre-export script?



I was trying to avoid the existence of some fields in the table. Is there anyway around this? I realize the calculated field option returns the desired field but can't I do it only when I export data?



Also, can I somehow manipulate the resulting excel file? For instance, can i set the width/height of the cells?



Thanks again!


I know this thread is now somewhat old but just in case anyone stumbles on it .... I find that to avoid creating unnecessary calculated columns, the best thing is to use a post export script and in there trigger a flow action which runs a little powershell script on the midserver to process the data of the exported csv (in a staging folder I export it to) into the format that I need and then write it to the true target destination folder.