Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy multiple fields to clipboard script

Status
Not open for further replies.

tektidim

Technical User
Nov 1, 2003
1
US
Hello,

I would like to create a scipt that copy information from multiple fields to the clipboard where i can paste the formatted data into another application like e-mail or MSword. i think I came close but the results vary. Sometimes it works sometimes not.

My current script: Activated by a [Copy Label] button.

First: I have a Set Field script that collects data drom selected fileds using the specify function and set it to a field(copy) which was created to hold the retrieved data.

Next: I added a Copy script and set it to the (copy) filed

Then: I had a Clear script and set it to the (copy) field

This workd only if I am in the this database. I am able to paste the info into wordpad.

Once I go to another database and nothing happends. There must be a cleaner. effective way of doing this. Any suggestions?

Thanks in advance,

Allistar
 
I presume you have a lot of fields or you would just do it all manually. Right? I'm also assuming you are dealing with one record at a time?
You might do better by exporting the record you are handling as a CSV or TAB file and importing it into your other application.


Cheers,
Paul J.
 
You mentioned formated for copying to another application. Have you tried formating this in a calculation field?

The calculation adds all of the text together, formated how you want it to look, then you are only copying the one field.

Regarding the other issues, to be sure you are copying the correct record information, you need the script to navigate to the correct record, copy that field, then go and paste it. To use the copy command, the field you are copying has to exist on the layout you are displaying. This isn't to say the user will be aware of this. For example, if the user is on layout 1, a script could take them to layout 2, copy a field and navigate them back to layout 1 paste the result and they would only see a screen flicker.

Setfield as you may know, will take the data from a field and copy it to where you want it to go without navigating to the layout. This is handy if you are working within a record. But as you are experiencing, the retrieval of the data is not consistant. This is likely because when you enter a new database, using the setfield command may be pulling the information from an incorrect record. Without knowledge of your database structure it's difficult to suggest a cure, but you need to be sure the record your want the data from is the active record. Use a script to navigate to the correct record and back and see if your script works consistantly.

One other possible solution may be a global field. While in the correct record, a script could copy or calculate the results to a global text field. Now when you are in your other database and access that global field, you will have the correct information there.

I hope this helps.

Marty
 
I agree with Marty...why not just use one joined field and copy its content vs. mupltiple copy+paste steps that WILL get messy.
create calculation field and join the others by:
Code:
| FieldName  | Type | Options |
--------------------------------
Joined_field | calculation| = Field_1","& Field_2 &","& Field_3

but I guess it depends what is in those fields and if ur performing any search or update at the same time.....
anyhow, you got pretty good post from Marty!
All the best!

> need more info?
:: don't click HERE ::
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top