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.

Passing text formatting through SetField

Featured Replies

Hi gang,

I've got a field called "stuff" which contains text that has been formatted (underlined, bold etc.). What I want is to set the field contents of another field, with formatting intact. Any idea on how to do this? I can't seem to find a way to do it,

Cheers

Steve Griff

The only thing I can think of is to use a 2-step script: Copy (from Stuff) and Paste (into destination field). This seems to work well in tests, but you may want to add script steps and fields that will store/restore the clipboard in the process.

I'm afraid I think you're right that copy and paste is the only way to move data around with its formatting intact. Which is unfortunate - not only because of the loss of clipboard contents, but also because of the need to ensure that the steps are performed on layouts where source and target fields are present and accessible.

Maintaining the contents of the clipboard is also not a straightforward task unless you can be certain that the contents will be of a particular data type (and then script the choice of an appropriate global field to use as a temporary 'dump' location). Eg. if you try to place a container into a text field etc you won't get anything useful back.

The only really elegant solution to this that I know of is the Troi ClipSave plug-in, which is a two-trick pony - it saves the clipboard and restores it.

Not to take anything away from Troi -- which makes a fine line of very useful plugins -- but Jazz has a freeware cross-platform plugin available which will also save/restore the clipboard.

There is another thread somewhere on FMForums which details a good way to save/restore the clipboard, but the basic premise is something like:

Save Clipboard Script

Go to Layout ("Clipboard Layout")

Paste (Global_Clipboard_Container)

If (isEmpty(Global_Clipboard_Container))

Paste (Global_Clipboard_Text)

End If

and

Restore Clipboard Script

Go to Layout ("Clipboard Layout")

If (not IsEmpty(Global_Clipboard_Text))

Cut (Global_Clipboard_Text)

Else

Cut (Global_Clipboard_Container)

End If

... where Clipboard Layout is a layout containing two global fields: Global_Clipboard_Container (global container) and Global_Clipboard_Text (global text).

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.