AnsweredAssumed Answered

export container field contents utility script performance issues

Question asked by ericjlindholm on Jan 30, 2017
Latest reply on Jan 31, 2017 by philmodjunk



I have a utility script for exporting container field contents to preview.  the only script parameter is getfieldname(field).  I cannot export field contents with a calculated field name so I have a stack of if else steps to allow the script to export the correct field contents.  every time I add a new field, I forget to add the new code to the script.  The performance is fantastic but is script is ugly and forgetting to add the new code makes me feel dumb. 


I tried to clean it up by creating a global container field in my globals table and doing the following:


Set Variable [ $field; Value:Get(ScriptParameter) ]
Set Variable [ $FilePath; Value:Get ( TemporaryPath ) & "/"& GetField ( $field ) ]
Set Field [ Global::ClipboardContainer; GetField ( $field ) ]
Export Field Contents [ Global::ClipboardContainer; “$FilePath”; Automatically open ] Set Field [ Global::ClipboardContainer; "" ]


It works.... over the WAN it is SLOOOW compared to the other method.  I will test it on my LAN tomorrow but I am trying to optimize WAN performance as well. 


Im sure there is some nuance to the set field script step when using containers and/or global fields.  that I don't know.  are there faster steps I could use?