I have a custom BOD that is created via a data flow and exported to an XML file. I need to set the output filename based on some logic related to the BOD content, but not exactly a field listed in the file template.
For example, the BOD has a field/element called Company. If its value is say 'ABC123', the filename should be something like FileType1_[current_date].xml, if the file name is 'XYZ456' or 'QRS 789', it might be FileType2_[current_date].xml, etc. In any case, the strings such as 'FileType1' and 'FileType2' do not exist in the output file contents.
It seems that custom header fields might be the best way to tackle this, but I am new to scripting and not entirely sure how to make that work. I have seen a couple of other posts that seem to set input variables for the content or headers and then output the content and updated headers. While I can set up multiple input variables within the script, in the data flow script input parameters, it only lists one. I'm not sure if that is a limitation or not. I tried it as is with just one input parameter and something of a guess at the code. However, when I tried to activate the data flow, I got some cryptic error saying "Message: Property 'outputVariable0' is not unique. All properties must be unique." I have no outputVariable0, so it must be a setup issue on my part.
Any suggestions on how to approach this would be much appreciated, especially if you have screenshots or snippets about the code or the script parameter setup.
Thanks.