Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Dynamic Exporting and Scripting


Tyson

Recommended Posts

Hello Everyone!

My question to all u pros is: I have a database that I export information into a tab file via Scripting . This .tab holds all the information that i need to email to my supplier. I can name the file that i want to export to, but does anyone know if there is a way i can export to a file based on field information?? ex : field vendor = new egg export to c:\newegg.tab || field vendor =Tech Data export to c:\tech Data.tab

 

Any information would be greatly appreciated im trying to script it to export to different files based on field records

 

-Tyson

Link to comment
Share on other sites

The export scriopt step, as you have found, does not allow the scripting of a variable name. In order to acheive what you want you will have to export the file to a fixed name file and then use an operating system script or batch file, to rename the file. A discussion of almost the same problem can be found:

http://www.fmforums.com/threads/showflat...true#Post165139

Link to comment
Share on other sites

This is what im using in the send event. The problem im having it doesnt want to output the way i have this. Can someone tell me weather or not what i have here will do what i want it to do. Im trying to copy a file through cmd prompt and then the copy file is dynamic based on the field. "CMD /K" & "copy c:\it\dynamic.tab c:\it\" & Purchase Order::Export Relate Dynamic & .tab"

Link to comment
Share on other sites

First of all do you get a command box opening?

If not is the "CMD /K" & "copy c:\it\dynamic.tab c:\it\" & Purchase Order::Export Relate Dynamic & .tab"

a calculation? (It needs to be)

Has it ever worked? What you are scripting here will leave a copy of dynamic.tab in C:\it\ and the next time you run the script you may/should get a message asking if it is OK to overwrite the existing file.

Link to comment
Share on other sites

actually what im trying to accomplish is copying the dynamic.tab file to the same location but as the name that i specify.

 

like "c:\it\dynamic.tab c:\it\Tech Data.tab" In order to do this i was trying "CMD /K" & "copy c:\it\dynamic.tab c:\it\" & Purchase Order::Export Relate Dynamic & .tab" substituting the purchase order exporte relate field to the c:\it\export relate field and .tab at the end so i could get tech data.tab. -Tyson Thanks again for all the help ive been gettin

Link to comment
Share on other sites

Well I got It Figured out so if anyone is interested this is how it works. Dynamic Exporting. Requires 1 Calc Field, 1 field for naming(popup menu checkboxes regular text), and 1 script.

 

1. text field whatever

 

2. Calc Field Example: Cmd Prompt is the field:: "\"c:\it\dynamic.tab\"" & " " & "\"c:\it\\" & text field whatever & ".tab\""

 

3. Send Event Calc "CMD /K" & "copy" & " " & Cmd Prompt Field

 

This allows you to export and specify the name for the file.

 

Hope this will be usefull to someone else than just me.

 

-Tyson

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.



×
×
  • Create New...

Important Information

Terms of Use