1 Reply Latest reply on Sep 13, 2011 7:56 AM by philmodjunk

    Inconsistency with Script Output



      Inconsistency with Script Output




      I have a script in my solution that saves a report as a PDF with a variable in the name and saves an fp7 with a variable as well. I've attached a photo of the script. Sometimes the variable Property::Test Report Address does not show in either of the output files.


      Examples of the output files would be;

      '15 King Street, Edinburgh, EH10 5TE Check Out Live.PDF'

      '15 King Street, Edinburgh, EH10 5TE Check Out Live Core File.fp7'


      Sometime I just get 'Check Out Live.PDF' and so on. Can anyone see why this would be?




        • 1. Re: Inconsistency with Script Output

          Since your script doesn't start with a go to layout step, it's possible (going just from what's in the script) that your script may sometimes be executed from the wrong layout. Only you can check that. If it's only run via a button from one layout and that layout is basedon the property table or one related to it, this isn't a factor.

          What does look odd is that you compute the path variables and then perform a find to pull up the records for the report. Thus, you may not be on the correct record when you compute the path. If the current record at the start of the script has an empty address field, it will be missing from the file path.

          I'd perform the find, then compute the path so as to be sure I have the correct record current when I compute the file path.