Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7595 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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.

Posted

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"

Posted

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

This topic is 7595 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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