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 discovered this trick by accident when I saw that a merge field was displaying a simple number field as a percent.

Here is how to format the numeric merge field:

Go to Layout mode. Do not select an object. Choose Number from the Format menu and define the desired format for the numeric merge field, such as currency or percent.

Now select Merge from the Insert menu or use the Text tool to type in the merge field. Change to Browse mode and the merge field is formatted as desired!

Remember to reset the Number format to the default you normally want, such as General or Leave Data Formatted As Entered.

I confirmed that this merge field formatting trick works in both FM5.5 and FM7 on number, date and time fields.

Have Fun! -- Mark

Mark Conrad

Application Developer

You can also format the merge field after adding it, by right-clicking on it or the text block in which its contained and selecting Number/Date/Time Format, as is appropriate.

To be more precise: the formatting does not apply to the merge field, but to the text object containing it. There may be multiple number/date/time etc. merge fields in a single block, but only one format for each type.

Yes, so if you have numbers that are percentages and numbers that are dollars you can only choose one format. So, you have to have multiple lines of text/merge fields and line them up on your layout.

  • 2 months later...

Or, alternately, if mixed merge number formats are a problem, you can do an intermediate repeating calculated text field to do the formatting for you and then just pull each repetition as needed. You don't have to use the FM formatting palette. You can force any format with a calculation.

  • 3 weeks later...
  • Newbies

can anyone help me with some merge fields formatting issues?

the FMP 7 tutorial manual says, “Merge fields expand or contract to fit the data in the field, and take no space if the field is empty.”

and I find this to be true if for example I setup my merge fields like so:

<><>

<><>

<><>

this will give me this look if say for example [color:red]item2 is empty:P

item1item1info

item3item3info

this is great, but if I add spaces inbetween my merge fields such as:

<> <>

<> <>

<> <>

this will give me this look if say for example [color:red]item2 is empty:

item1 item1info

item3 item3info

for some reason whenever spaces are added in between the two merge fields, filemaker will no longer collapse if there are empty data fields.

does anyone know why this happens, or have you ever run into this problem? the FP7 tutorial file (MyFile10) has spaces and it works just fine. however if you manually add spaces and recreate this file, the collapsing no longer happens.

Thank you for anyone that can help me with this tiny bit of annoyance.

Actually, it's quite simple. The line "<> <>" contains a space, and that's what you're getting, even when item2 and item2info are empty. If you were to create a calculation field ("item2plus") which was defined as: item2 & " ", and used that instead, with the resulting format of: <><>, then the line would disappear & items 1 and 3 would be collapsed together, as you desire.

-Stanley

  • Newbies

good call Stanley. thank you for your help. i didn't realize the space was actually giving me the line break, well, because I couldn't see it. the calculation will work great.

Side note:

If you go to a calc field instead of merging then you have even more control over linebreaking and spaces with the very powerful 'substitute' and 'trim' commands. I find the different options for the trim command especially helpful, and substitute is great for paragraph breaks.

This is one powerful way to create multi-key fields :P

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.