Field doesn't display as expected

I have a field that displays a number with a decimal from 6 to 10 digits. I have the field set to display zero decimals.

Yet, when the layout comes up, the field is "blank" until I click on it. Then, I see the entire number including decimals until I click off it the field. Then, and only then, do I see the expected integer number (after I let up on the mouse key).

This problem happens with other fields defined the same way.

What am I doing wrong?

Thanks in advance,

What type of field is it?

Hi Cecile,

Thanks for writing back.

It's a calculated field.

Below you see in:

1 -- what the field looks like when the layout starts.

2 -- what the field looks like when I click it.

3 -- what the field looks like when I release the mouse (expected in step 1).


I've tried the calculation result as both "number" and "text" with the same result.

As you can see, there's plenty of space to hold the data shown.

Any ideas?

Thanks! :slight_smile:

image

It’s like it won’t commit until you exit the field does it recalculate based on other fields in that layout.

Kinda except the example above was already committed. It just doesn't display properly when loading the layout.

Is this an FMP Bug?

Thanks

Hopefully the super savvy will pitch in soon

Just trying to know more:

  • have you tried playing with your system settings to see if it could involve the decimal characters used (. vs ,)?
  • have you tried if you can switch using system formats to file formats or vice-versa?
  • does the calc has global storage?
  • is the calc stored or unstored?
  • is the field belonging to the same TO as the layout or a distant one?
  • what happens if you just do a refresh window?
  • What version of FM? Can you try different versions?
  • Screen capture is a mac. Would it be easy to validate if the behavior is the same on a PC?
  • If you replicate the basic components in a sample file, do you see the same behavior?
2 Likes

For sure, I would keep the calculation result as 'number', not text.

Answers inline below:

**have you tried playing with your system settings to see if it could involve the decimal characters used (. vs ,)?**

Seems to make no difference.

**have you tried if you can switch using system formats to file formats or vice-versa?**

I tried "general", but I don't know what you mean about "file formats"

**does the calc has global storage?**

No, it's per record.

**is the calc stored or unstored?**

It's unstored, but the data for the example shown was already written to the table.

**is the field belonging to the same TO as the layout or a distant one?**

Same one.

**what happens if you just do a refresh window?**

Nothing.

**What version of FM? Can you try different versions?**

16, Don't have any other version.

**Screen capture is a mac. Would it be easy to validate if the behavior is the same on a PC?**

No idea.

**If you replicate the basic components in a sample file, do you see the same behavior?**

It works as expected in separate file.

The layout in question has tons of calculations, graphics, and other features, but the calculation is happening the exact same way as in the sample file.

Not sure what to conclude there.

Since the data are already in the fields, but the layout simply won't display them until I click in and out of the field, how do you debug that?

Good questions, thanks!


This is what I am referring to when I say "file formats" vs "system formats": when that menu item has a checkmark next to it, your system formats supersede the file formats, when there is no checkmark, you are using the file formats.

In itself, if the problem is no in a newly created file, it is a good sign. It tells me that with the right conditions, your main file should be able to output the number the same way. Finding the right conditions may not be easy, but we will try to help.

If the problem is not there in a newly created file, my guess is it could be either the file (or objects within the file) or some configuration of local settings vs the file. Here are a couple more things to look into:

  1. Make sure there is no conditional formatting applied (or anything else fancy with hide conditions, placeholder text, ...)
  2. Try adding the field again to the layout (no copy-paste, just add the field and replicate the inspector settings by hand).
  3. Try duplicating the layout and removing every other object.
  4. Try creating a brand new layout on the same TO, copy-paste your field + add the same field by hand like in step 1.
  5. Check to see if the file behaves the same locally vs hosted on a server.
  6. If none of the above leads you anywhere, look at the log file generated by a recovery + check if the behavior is the same in the recovered file.

Also, could you tell us what version of MacOS you are using?

I hope this helps. I'm curious about what the explanation may be.

1 Like

Thanks for all your help! :sunglasses:

Doing a refresh window in the script seems to work. I had tried Refresh window from the menu before.

Thanks again.

(Mac OS 10.15.3)

1 Like

Is it an unstored calculation? Is the box Do not calculate if all fields are empty checked?

Glad you were able to fix it.

1 Like

Nope, not checked.

Thanks B. You came up with tons of great things to check. Fortunately the problem was an easy one this time. :nerd_face:

Did you check the "Delineate" option for the layout? This is the default setting and means that formatting only applies to the current record. Thus, clicking in the field might activate that record as the current record, but because the cursor is in the field, you see the full field (done that way so that you can edit the real value instead of the displayed value).

Don't know if that applies, but it fits your original description and I don't see any mention of checking for that setting. This is mainly an issue for list view though, not form view.

Thanks Phil!

So good to see you back posting. We will all benefit from your participation. :nerd_face:

In this case, the refresh script step fixed it.

Thanks again!