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

Copying 8 fields at the same time with one button


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

Recommended Posts

Posted

FMP V6.04

I like to create a button that by clicking it would copy 8 fields (all address details of a client) so I can paste it in to another document.

I am not sure how to go about this.

Do I need to write a script, and if so does anybody have a sample as I am not sure how to go about it.

Alternatively I can think of creating a layout like an envelope and copy it from there. However I am not sure how to do this either as I can not find a way of copying this text field. In other words I would like a user to only have to click one button to perform the whole copy routine.

Maybe it is not possible? does anybody know?

Thanks for your help

Posted

Hello ChangeAgent.

If the eight fields in question are the only fields on the current layout, then simply choosing Edit>Copy with no fields active (ie after exiting the record) will copy all eight at once.

However if that's not suitable, you will require a script and a global text field (which will have to be present on the layout, though it can be hidden).

The script (for FileMaker 6) can be structured as follows:

Set Field [GlobalTextField, Field1 & ¶ & Field2 & ¶ & Field3 & ¶ & Field4 & ¶ & Field5 & ¶ & Field6 & ¶ & Field7 & ¶ & Field8]

Copy [select All; GlobalTextField]

Exit Record/Request[ ]

Once you have created a three-line script along the lines of the above, you'll be able to attach it to a button if you wish. :wink2:

Posted

Thanks CobaltSky,

No there are more fields on the layout otherwise I would have used the copy method.

I am going to experiment with your script. will report back. Pity the field (hidden) needs to be on the layout and can not be on some other layout as I have a compiled field (the 8 fields in one field compiled for a envelope printing job). No workaround?

thanks

Posted

I have a compiled field (the 8 fields in one field compiled for a envelope printing job)

Sure - if you have such a field already available on another layout you can use it.

An alternative script to achieve that would be along the following lines:

Freeze Window

Go to Layout [YourOtherLayout}

Copy [select All, Your8ValueField]

Go to Layout [original layout]

:wink2:

Posted

Now this is for fm6, but it isn't the healthiest of habits to teach newbes to reach out for clipboard tampering tools, when ever chances occure!

--sd

Posted

Now this is for fm6, but it isn't the healthiest of habits to teach newbes to reach out for clipboard tampering tools, when ever chances occure!

--sd

Søren,

Kindly read the question.

ChangeAgent specifically asked for a way to copy some data to the clipboard for pasting into another document. FYI, the copy and cut commands are widely considered *industry best practice* for getting data onto the clipboard. :wink2:

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