Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4067 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

basicly i have filemaker so that it exports to csv what i then need is to add a line of normal text at the top of the document ive already used the append to file script and set it up up but it creates the line of text at the bottom of the document and i need it at the top because the csv is picked up by another program that prints postage labels automaticly and registers it with the delivery company and they require that a line be added to the csv that simply just says ADD WHS but without commas and on its own line.

 

cheers in advance

ryan

Posted

As you are using Scriptmaster, you could use several of the functions in sequence.

 

Assuming that your original CSV file output from your database was labels.csv ...

 

use the Write To File function to create a new file called newLables.csv and write the text ADD WHS to it

use the Read File Contents function to read the content from the original file labels.csv into a local variable

use the Append to File function to append the contents of the variable to newLabels.csv   

 

if you wish, you can then use DeleteFileorFolder and Move or Rename File to delete the original csv file and rename the new file to the old file name.

 

The file path needed for the Scriptmaster functions is not the same as Filemaker uses.  There are several custom functions around which can help with rewriting the path - try http://www.briandunning.com/filemaker-custom-functions and search for File Path.

 

HTH

 

Brian

This topic is 4067 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.