Jump 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.

Featured Replies

I have a database with text entries with different fonts and sizes, etc.. Is there an easy way within FMPro to keep all fields consistent in font appearance without going through each field and changing the format.

quote:

Originally posted by Tal:

I have a database with text entries with different fonts and sizes, etc.. Is there an easy way within FMPro to keep all fields consistent in font appearance without going through each field and changing the format.

While there isn't a global preference for field fonts, you can change all of them in a single layout at one time, which might be sufficient.

Click on one field in a layout. Hold down Cmd-Opt-A. All of the fields on the layout will be selected. Now you can use the Format menu to change the font characteristics.

Chuck

quote:

Originally posted by Chuck:

While there isn't a global preference for field fonts, you can change all of them in a single layout at one time, which might be sufficient.

Click on one field in a layout. Hold down Cmd-Opt-A. All of the fields on the layout will be selected. Now you can use the Format menu to change the font characteristics.

Chuck

While we're on the subject, you can also use cmd-opt-a to select all text blocks in the layout the same way (click on one text block...).

And a question: What do Windows users press to get the same result.

  • Author

quote:

Originally posted by Chuck:

Click on one field in a layout. Hold down Cmd-Opt-A. All of the fields on the layout will be selected. Now you can use the Format menu to change the font characteristics.

Chuck

  • Author

How would this apply to data which has already been entered. This key combinatiuon does not seem to work in browse mode.

quote:

Originally posted by Tal:

How would this apply to data which has already been entered. This key combinatiuon does not seem to work in browse mode.


For that you would have to script the reformatting. I've not done it myself, but I think the way it would work would be to find all of the records and then perform a replace on the field, using as the calculated replacement the field itself.

But you might have to loop through the found set, copying and pasting from and to the field that has the custom formatted data.

I think you have to make sure that when you use the Paste script step, that "Include formatting" or something similar, is off.

Chuck

  • Author

quote:

find all of the records and then perform a replace on the field, using as the calculated replacement the field itself.

But you might have to loop through the found set, copying and pasting from and to the field that has the custom formatted data.

I think you have to make sure that when you use the Paste script step, that "Include formatting" or something similar, is off.

Chuck

Hmm.. I tried this, and may not fully understand because I'm a liitle confused about the process. Is there not an easy way to just have all the text in a database have consistent fonts

, why should data maintain font information ?

quote:

Originally posted by Tal:

Hmm.. I tried this, and may not fully understand because I'm a liitle confused about the process. Is there not an easy way to just have all the text in a database have consistent fonts

, why should data maintain font information ?

Sorry for the misinformation. I hadn't tried it myself. I remember seeing how to do this, but I guess it's more complex than I assumed. Someone else here has asked a similar question and I'm trying to find the place I saw the solution to this puzzle.

If I do, I'll be sure to post the information here.

Chuck

  • Author

quote:

Originally posted by Chuck:

Instead of looping through the records, a replace will reformat the field to it's original format.

Chuck

Can you be more specific about the exact process of creating this script or "post the example"?

quote:

Originally posted by Tal:

Can you be more specific about the exact process of creating this script or "post the example"?


Let's say that you have a field called "Title" on a layout called "Entry" that you want to be formatted in red bold. But some of the users of your system have custom formatted the text as green italics. You want to reformat the text to your default. Do I understand the problem (in general) correctly?

OK, here's the script:

Go to Layout [ Entry ]

Show All Records

Replace [ No dialog, "Title", "Title" ]

In other words, replace the data in the "Title" field with the data in the "Title" field. The data doesn't change, but the Replace script step strips any custom formatting from the calculation.

In the script you are using to do this, find the Replace step, and place it in your script. Click on the check box for "Perform without dialog". Click "Specify Field" and select your field to clean up. Click "Specify" and you'll get the Replace dialog. Click the radio button for "Replace with calculated result:" and click the "Specify" button to its right. Find your field (the same field you used in the "Specify Field" parameter) and double-click it so that it is the entire calculation. Click OK to dismiss the calculation dialog and then click OK to dismiss the Replace dialog.

Now run the script. Your data in that field should be back to it's default formatting.

If you follow the instructions here, so that you are replacing data in a field with the data already in that field, you should have no problems, but the Replace script step is dangerous. Just in case there's a mistake, and you lose the data in your field, perform it on a backup to make sure it works. Or perform the script on a found set of one dummy record (taking out the Show All Records step) and see if it works.

Chuck

quote:

Originally posted by Chuck:

Sorry for the misinformation. I hadn't tried it myself. I remember seeing how to do this, but I guess it's more complex than I assumed. Someone else here has asked a similar question and I'm trying to find the place I saw the solution to this puzzle.

If I do, I'll be sure to post the information here.

Chuck

Instead of looping through the records, a replace will reformat the field to it's original format. I just tested it on my Mac with FMP 5 and it worked. Just replace the field with its own contents.

Chuck

  • Author

Works great, Thanks.

Create an account or sign in to comment

Important Information

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

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.