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.

Featured Replies

Hey, Everyone.

I

Place the Fields you want to copy on a separte layout, and then Use the Script Step Copy All Records

Lee

wink.gif

I defined a global field as "Email_Text" then used (as you mentioned) an "Insert Calculated Result" to create the text of the email. In the "Send Mail" script step, just specify that the message is the "Email_Text" field.

Works fine. wink.gif

The trick is don't have your cursor in a field (click on background or hit Enter; in a script, Exit Record/Request), then Copy. You'll get all the fields on the current layout, in order, separated by tabs.

(In version 7 I just noticed that calculations are returned to 15 or 16 decimal places, ignoring the custom format on the layout, whereas 6 seems to respect it. 7 also seems to return ? for a container field, whereas 6 just ignores them. You'd want a dedicated layout for this operation.)

I was reading Lee and Fenton's solutions (and trying them out since it was new information for me! smile.gif ) and noticed that I answered a question different than the one that was asked. crazy.gif

If you are manually creating an email and want to be able to paste the text from six fields, using a global with an "Insert Calculated Result" script step will work, but instead of using a "Send Mail" script step, use the Copy[Email_Text] step to get the text to your clipboard.

Paul

  • Author

Good idea, Damocles. I'm guess you can also incorporate this with what Lee suggested.

Have a global field which is a calculation of the how-ever-many fields you want to copy. Have a layout with this global field on it and then a script which "copy records" from that layout.

This way you can get around the automatic "Tab" spacing that simply copying all the fields together results in.

Cool beans.

If you are just wanting to paste the data directly into an email, the script step puts the data on your clipboard, so all you would have to do is paste it in the body of your email program. If you need to do other things with it, then you may want to paste the results into a field in your layout, or have a concatenating calculation field.

HTH

Lee

cool.gif

Copy all records won't work. It will copy all records. That's not what the user asked for. If you use the copy command while no field is selected, then all the fields from the current record/current layout will be put on the clipboard in tab delimited format. But it would be better to use a script or calc field to put the data together the way you want.

Be aware of FMP 6's 64KB text field limit...

Bruce said:

Copy all records won't work. It will copy all records.

Yes it will work, I use it all of the time. All you have to do is to isolate the record, or records that you want to copy before activating the Script Step. I use a method by which I first "Mark" the records to be copied, perform a Find for the "Mark" records, and then use the Script Step Copy All Records.

That's not what the user asked for. If you use the copy command while no field is selected, then all the fields from the current record/current layout will be put on the clipboard in tab delimited format. But it would be better to use a script or calc field to put the data together the way you want.

My first response suggested that Ross place the fields to be copied on a separate layout to be used for this.

BTW, if it is always going to be just the Current Record, then Ross could also substitute the Script Step of "Copy Record" for "Copy All Records" and accomplish the same thing.

Lee

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.