sicSRT8 Posted July 22, 2009 Posted July 22, 2009 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/....?
LaRetta Posted July 22, 2009 Posted July 22, 2009 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.
sicSRT8 Posted July 22, 2009 Author Posted July 22, 2009 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.
LaRetta Posted July 22, 2009 Posted July 22, 2009 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?
sicSRT8 Posted July 22, 2009 Author Posted July 22, 2009 I may have used wront termonology. I cant figure out how to add that red potion to the value...
LaRetta Posted July 22, 2009 Posted July 22, 2009 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.
sicSRT8 Posted July 22, 2009 Author Posted July 22, 2009 (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 July 22, 2009 by Guest
LaRetta Posted July 22, 2009 Posted July 22, 2009 (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 July 22, 2009 by Guest
OneTime Posted August 12, 2010 Posted August 12, 2010 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
Recommended Posts
This topic is 5567 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 accountSign in
Already have an account? Sign in here.
Sign In Now