Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Copying 8 fields at the same time with one button

Featured Replies

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

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:

  • Author

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

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:

  • Author

CobaltSky,

Great, thanks a million! It works like a dream!

Blessings and regards

Edited by Guest

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

  • Author

Da?

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:

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.