Skip 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.

Odd Paste() script-step behavior

Featured Replies

Hi all:

I am using Copy() and Paste() script steps to copy data from one global field to another. For a short while the Paste step would paste whatever old data I had lying around on my clipboard, regardless of what field was Copied. Now it appears to be pasting nothing at all.

I have debug statements placed to show the value inside the global to be copied, and it shows correct data, but how can I (if at all) debug/output what FM has placed on the clipboard with the Copy step while inside a script?

Thanks

Kurt

Use Set Field instead of Copy/Paste, unless you are copying and pasting all records. Then this won't even be an issue.

Globals are accessible from any table, regardless of whether a relationship exists between them, as long as there are TOs for them in the relationships graph. So Set Field [table1::global1; table2::global1] will work even when table1 and table2 aren't related.

Copy and Paste are also layout-dependent: the target fields must be on the current lauout at the time the steps are invoked, otherwise they fail.

Set Field has no such problem.

Hi Vaughan,

Copy and Paste are also layout-dependent: the target fields must be on the current lauout at the time the steps are invoked, otherwise they fail.

To add to this a little. While It is true that your script has to go to a layout where your Copy Field resides to "Copy", and then it a Layout where your Paste Field resides to "Paste", the user doesn't have to watch it do it. All you need to do is to use the Freeze Window Script Step before you start it on its journey.

However, the Set Field is a better way to do this 90% of the time.

HTH

Lee

cool.gif

  • Author

Thanks to you all for your replys.

I am indeed copying from one layout before moving to, and pasting into, another, so that is covered. I didn't know about the 'Freeze Window' command but know I will be using it now!

I normally use Set Field in my scripts but was under the impression that it wouldn't work in Find Mode. I don't know why I thought that but will certainly give it a go.

Thanks

Kurt

  • Author

Worked great. Thanks.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.