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.

Notes Field Looses Exisiting Formatting On Insert

Featured Replies

I have a notes field that contains information about our customers that is useful in sales. Our sales people like to apply formatting to the text in this field so important information can be bolded, or red, etc.

The problem is, I have a script that is used when a new note is added. So, a user clicks the 'New Note' button, and the script automatically inserts the date and username like in the following example:

Set Field["Notes", "DateToText(Status(CurrentDate)) & " (" & Status(CurrentUserName) & "): " & "nn" & Notes"]

NOTE: The 'nn' above is really the FM paragraph symbol...

This puts the new notes entry at the top of the notes field, so the newest entries are at the top. However, when this script is run, any existing formatting is lost. I think it is because it is essentially copying and pasting the existing text, and FM doesn't carry over the existing formatting.

Has anyone run into a similar situation? Is there any way around this? I want to keep the formatting, but still want to automatically enter the date and username before each entry and keep newest entries at the top. Our old ACT DB could do this... can FM?

Thanks for your help.

If you Paste the old notes instead of Set Field, you can retain style. In other words

Copy["Notes"]

Set Field["Notes", "DateToText(Status(CurrentDate)) & " (" & Status(CurrentUserName) & "): " & "nn"]

Paste["Notes"]

When pasting, do not "select entire contents" and do not "paste without style"

This is expected behavior for FileMaker Versions 6 and older (calculations strip any text formatting). Rumor has it that this will change in V 7.

There are some workarounds,

Click Here to see one example of a workaround.

and here a couple more:

Text Style By: Steve Murray URL:

http://www.fmfiles.com/tnt11.html

Scripting the insertion of coloured/formatted text! By: Ray J. Cologon URL:

http://www.nightwing.com.au/FileMaker/

Field Text Formatting System Sampler By: Ray J. Cologon URL:

http://www.nightwing.com.au/FileMaker/

HTH

Lee

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.