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

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

Recommended Posts

  • Newbies
Posted

I am having trouble with a script. I have a layout that has a container field. I use the container field to reference to resumes located on a server. I want to be able to take a found set and export the resumes for each record. Ultimately I want to attach said resumes to a new email in OS X Mail client.

I want to at least be able to export the resumes to a set folder. Which I can then automate further.

At this point I can export only one record at a time.

Posted

One record at a time it needs to be - but you can have a script loop among the found records and do it for you. See here:

http://www.fmforums.com/forum/showtopic.php?tid/179603/post/218603/#218603

Note that since you only want the found set, you should leave out the first step that shows all records.

  • Newbies
Posted

That script appears to rename each file. Is there a way to keep the current filenames?

I could reference a name on the corresponding record but some of the files differ in extension. Some are .docs, .txt, and .pdf

Posted

You can get the file name and extension from the container field. If your files were inserted as 'file, reference only', the calculation GetAsText ( ContainerField ) will return the file's relative and absolute paths. To extract the file name and extension and append it to the desired path, you could use something like this (untested!):)

Let ( [

paths = GetAsText ( YourContainerField ) ;

len = Length ( paths ) ;

fileName = Right ( paths ; len - Position ( paths ; "/" ; len ; - 1 ) )

] ;

"filemac:" & Get ( DesktopPath ) & "ExportedFolder/" & fileName

)

Posted

I am not sure what you mean by "both". There is only "one" in my post here, and it's not a script: it's a calculation. You would use that in the SetVariable[] script step to calculate the desired value of $filePath.

This topic is 6213 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.