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

Fixing the font in a field, locking out use of any other font.


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

Recommended Posts

Posted (edited)

Does anybody know how to set up a FMP8 DB so that the font is absolutely fixed in a field.

I have a problem that if people paste stuff from another source in to a field it takes the pasted font. I would like to ‘lock’ the field so it records everything in the font I preset and at the size too, so no other options are possible. Thanks.

Edited by Guest
The Topic: <a href="http://fmforums.com/forum/showtopic.php?tid/210287">Fixing the font in a field, locking out use of any other font.</a> was moved from <a href="http://fmforums.com/forum/showforum.php?fid/80">User Group Central - Sponsored by FMPug.com
Posted (edited)

Use the Auto Enter Option for the field with the TextFormatRemove ( text ) as the calculation.

Click on the field you are wanting to control in the "Define Database"

Click on the Options for the Text Field

Click on the Auto Enter Tab

Click on the "Calculated Value"

Select TextFormatRemove ( text ) From the list of Text Formatting Functions, and modify for your field name.

Click Okay

[color:red]Deselect the checkbox

"Do not replace existing values (if any)

HTH

Lee

Edited by Guest
Posted

Hi Lee,

Sorry but it does not work.

Field command now reads: "TextFormatRemove ( Notes )" BTW, field is called "Notes".

and in "Define Database" it now reads:

Notes - Text - Indexed, Auto-enter Calculation replaces existing value.

Posted

Auto Enter only works on new records, if you are trying to do this with existing data, then you will need to use it in a Loop Script.

removeStyle

Go to Layout [ original layout ]

Go to Record/Request/Page

[ First ]

Loop

Set Field [ Notes; TextFormatRemove ( Notes ) ]

Go to Record/Request/Page

[ Next; Exit after last ]

End Loop

HTH

Lee

Posted

Auto Enter only works on new records, if you are trying to do this with existing data, then you will need to use it in a Loop Script.

I did try that in a new document and just tried again, no luck it just pasts in the font as in original doc. Did you realise I am in V8? Or does this not matter?

Posted (edited)

The Auto Enter Calculation should work. However be sure that you have [color:red]deselect the check box I mentioned above.

The script should work once you select your field info.

If this doesn't help, then I suggest your post a NO RECORDS clone of your file so that we can see first hand what isn't working.

HTH

Lee

[color:red]p.s.

I'm headed out of town for the day, I check back later to so if you have received help or solved your problem..

Edited by Guest
ps
Posted

The Auto Enter Calculation should work. However be sure that you have deselect the check box I mentioned above.

I did

The script should work once you select your field info.

Sorry no luck

If this doesn't help, then I suggest your post a NO RECORDS clone of your file so that we can see first hand what isn't working.

Not sure how to do it in the forum, so it is here:

http://www.megafileupload.com/en/file/122154/Empty-fp7.html

Posted

Not sure how to do it in the forum, so it is here:

It really isn't that hard.

First, Zip your file.

Then, when you make a reply to your Thread.

Look down the page and you will see

File Attachments: 0

Valid file types: zip, txt, pdf, bmp, gif, jpg, png, sit, mov [color:orange]Manage files

Select

[color:orange]Manage files

A popup windoow will appear.

Click on "Choose File"

find your archived file, and select it.

Then click on "ADD"

it will upload, when it is done,

Click on Finished.

HTH

Lee

Posted

Lee, thank you, I just fixed it. Must have been a bug somewhere, after I did a restart it worked! I have had this before with FMP8, and not sure as to why. anyway, thanks for your help!

Posted

I should have picked up on your versions. Although I use Version 8 occasionally to verify that what I have suggested will work, it isn't supported in Leopard. AFAIK, only versions 8.5 and 9 had patches for Leopard?

Lee

Posted

, then you will need to use it in a Loop Script.

removeStyle

Go to Layout [ original layout ]

Go to Record/Request/Page

[ First ]

Loop

Set Field [ Notes; TextFormatRemove ( Notes ) ]

Go to Record/Request/Page

[ Next; Exit after last ]

End Loop

It would be nice to clean up the other fields, but unfortunately I do not understand these instructions.

are we in Layout mode? because in that case I do not know where to find the first or second instruction. Sorry for being thick.

Posted

Lee thank you you ares so kind.

am I pushing my luck if I wanted to use this script, but if the text was bold, maintain the bold?

Posted

Is there a pattern to what you want bold?

An example would be helpful.

Lee

Posted

Morning Lee,

sorry for the delay, I am in a different time-zone as you and away from my office a lot at the moment.

No there is not, some people (who entered stuff) might have added bold a random places.

Posted

Try usign the TextFontRemove() and TextSizeRemove() functions instead.

TextFontRemove ( TextSizeRemove ( text ) )

will remove any font and size formatting, and keep other style elements such as bold or italic and color.

This topic is 5596 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.