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

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

Recommended Posts

Posted

What would it take to be able to export a single record or a group of records (today's date) to a new .xls file. If there is a way can you use a specific field to name the file?

Script- Find Records/Export/....?

Posted

You need to use a variable, something like:

Set Variable [ $filename; Value: Substitute ( Get ( CurrentDate ) ; "/" ; "-" ) & description & ".xls" ]

Set Variable [ $fullpath; Value:Get ( DesktopPath ) & $filename ]

Save Records as Excel [ File Name: “filewin:$fullpath”; Records being browsed; Use field names as column names ]

Specify the output file as: filewin:$fullpath

There are many variations depending upon where you want to save the document, the type of document and the file name. If you want to save the current record and it is a customer table with a unique CustomerID, you would just use the field CustomerID in place of the filename.

Posted

You need to use a variable, something like:

Set Variable [ $filename; Value: Substitute ( Get ( CurrentDate ) [color:red]; "/" ; "-" ) & description & ".xls" ] How do you add multiple values?

Set Variable [ $fullpath; Value:Get ( DesktopPath ) & $filename ]

Save Records as Excel [ File Name: “filewin:$fullpath”; Records being browsed; Use field names as column names ]

Specify the output file as: filewin:$fullpath

There are many variations depending upon where you want to save the document, the type of document and the file name. If you want to save the current record and it is a customer table with a unique CustomerID, you would just use the field CustomerID in place of the filename.

Posted

How do you add multiple values?

I need an example. Are you saying you want to name a file with 50 ContactIDs if there are 50 ContactIDs in the record set?

Posted

Set Variable [ [color:green]$filename; Value: [color:red]Substitute ( Get ( CurrentDate ) ; "/" ; "-" ) & description & ".xls" ]

When you double-click 'Set Variable' to insert that line into your script, you will see a button lower right called 'specify.' When the Specify opens there are two boxes. The top box is for you to put your variable name (such as the green above).

The next box is where you place the value (the calculation itself) which, in this case, is the ENTIRE portion in red in my version above. So the calculation is:

Substitute ( Get ( CurrentDate ) ; "/" ; "-" ) & description & ".xls"

... it is a concatenated calculation which turns the filename result into something like:

7-22-2009 ContactID 44.xls

... I called it 'the description' because I had no idea what you would want to put there. But it is a standard concatenated calculation.

Posted (edited)

My error yet again... I started with get.... not substitute...

Thankyou

Now that that is solved are you able to specify what fields are exported? I assume its a bunch of find scripts?

Edited by Guest
Posted (edited)

An export is an export. You can export in many formats or Save As Excel ... all offering ability to specify the fields you wish to include.

It would be one script similar to:

1) Find your records to export. Now that you have the record set.

2) Run the above variable portion to set a variable to the file name

3) Then decide if you want to Save As Excel or Export - I assume Save As Excel so just have a table with the fields on it that you want to export or ... if you want to export,

add an Export script-step and specify your fields then, in 'specify output file' list it as filewin:$fullpath

Edited by Guest
  • 1 year later...
Posted

LaRetta, thank you for this information. I have been able to successfully name and save to the desktop and folders on the desktop. However, I am having trouble setting up a filepath to save to a remote location.

If you would be so kind could you take a look at Post#362879?

Thank you

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