1 Reply Latest reply on Aug 3, 2012 6:07 AM by philmodjunk

    Help with 'Set Variable' needed

    DavidHorsley

      Title

      Help with 'Set Variable' needed

      Post

      I am trying to export records from a table (called 'Reserve") to a CSV file using the value from a field (Field) as the title of the created CSV file, without much success, despite reading many other posts on the issue.

      I currently have:

      Set Variable [$$Field; Value:Reserve::Field]

      Export Records [$$Field.csv:Macintosh]

      The script puts the CSV file on my desktop as fieldname.csv, not the unique vale of the field xxyyzz.csv which is what I need.

      Help anyone ???

        • 1. Re: Help with 'Set Variable' needed
          philmodjunk

          Do you have FileMaker Advanced? If so enable debugger and data viewers and run the script while watching the value in $$Field to see if it receives the value that you expect. If not, insert a show custom value step or put $$Field on a layout as a merge variable: <<$$Field>> so you can check the value in the feild

          Export Records [$$Field.csv:Macintosh]

          Isn't the right syntax. Do you actually have this?

          Export Records [ csv:Macintosh ; $$Field ]

          I also would not epect that to export to the desktop unless your database file is also located on the desktop. Normally, one needs to specify the path to the desktop in the variable. Something like:

          Set Variable [$FilePath; value: Get ( DesktopPath ) & Reserve::Field ]