Jump to content

text field formatting - why does it vary at times?


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

Recommended Posts

I can't figure this thing out!

In file1, I have a text field that has data in it that is a phone number. The data was entered by two different people, so some of the 600 fields have verdana size 12, some are verdana size 10.

In file1, why can't I force the formatting to be a specific font size?

And, in file2 which is related to file1, when the phone number shows up in a field or a merge field in a layout of file2, the data formatting is variable as seen in file1 where the original data lies.

I want it to be a specific size - but I can't force it to be! Help! I hope there's an easy fix for this!

Under FMP6 it seemed that just file1 had the variable text size, not in file2 when it was referenced via a relationship. How can I fix this! ?

Thank you so much in advance.

FileMaker Version: 7

Platform: Mac OS X Panther

Link to comment
Share on other sites

Text attributes applied to the text in a field as it is entered will override the settings defined for a field in layout mode. In FMP7 you can use the text formatting functions to fix the formatting. For instance, if you want all 12 point, just do a looping script where you do a set field[] on the field in question

set field[fieldname, TextSize(fieldname;12)]

You could also set the field to an auto-enter calc. using the same TextSize() function so that no matter what size attributes someone sets, it will always be formatted to 12point

Link to comment
Share on other sites

A strange thing noticed.... If you have a field on 2 layouts one with 12 point and one with 24, and then you use the TextSize(field;12) function in a set field[] the text still appears as 12 point and 24 point respectively on the two layouts. But if you choose another size, say 16, then the formatting applied in the script shows on both layouts, as you would expect with text formatted in browse mode. Can anyone else verify this?

FileMaker Version: Dev 7

Platform: Mac OS X Panther

Link to comment
Share on other sites

One more thing....

Maybe a better way to remove all formatting from a field formatted in browse mode (other than exporting to text and reimporting the data) would be to use cut/paste where you paste text only.

Here is an example for a field named "test3"

Freeze Window

Go to Record/Request/Page [ First ]

Loop

Cut [ crap::test3 ] [ Select ]

Commit Records/Requests [ No dialog ]

Paste [ crap::test3 ] [ Select; No style ]

Go to Record/Request/Page [ Next; Exit after last ]

End Loop

Can anyone else think of a better/more efficient way to remove text formatting other than export/import or cut/paste?

Link to comment
Share on other sites

Thanks guys - I ran a script to remove the formatting, then apply TextSize and TextFont to the field to standardize its appearance - now it shows up correctly in all layouts.

Just getting used to this new version!

Link to comment
Share on other sites

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