Jump to content

Field formatting


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

Recommended Posts

  • Newbies

Hi,

I'm new to FileMaker Pro. I have used Visual FoxPro extensively in the past but that is not a possibility with this project [i am an avid hacker but computers are not my profession]. I have read the "Field Filters:Formatting Data Automatically" from the FileMaker web site but even following the instructions for a phone field format if I re-enter the field the format is lost and intermittently returns upon tabbing out of the field.

Questions:

1.. Should I have a tab stop for the format definintion field?

2. Should I do anything to make either field invisible as with fill, colors etc.

3. Is there any way to fill with fomatting characters such as (xxx) xxx-xxxx where only the "x" can be replaced. I do not see any way to do this and I seen no way to limit the length of a field (maybe too green at FileMaker.

Any and all helpful suggestions appreciated.

Bob Hartung

Link to comment
Share on other sites

Hello Bob,

here are explainations to your questions:

  • yes, you MUST set a TAB ORDER in which the editable field is the first and the hidden calculated field is second

  • you can change, as you want, the colors and attributes of the fields (text, background and borders; these last,to be invisible, must have the same color of the form)

  • the solution to your third question is contained in the formula of the calculated field in the example you've downloaded.

    Because you are a Xbase programmer (as i'm), you certainly know the way to parse a string and subtitute the chars you want.

Regards & happy FileMaking.

Link to comment
Share on other sites

  • Newbies

Thanks for the response. I'm a little closer but I do not yet fully "get it". I have 2 fields: (1) HomePhone and (2) HomePhoneFormat with the proper expression in the latter to give the format (xxx) xxx-xxxx. Field 2 is immediately on top of field 1 and immediately follows it in the tab order.

I have hidden (1) by giving text and background of the field valued identical to the page. Now when I tab into (1) I get a background colored box on top of (2) that obscures it. Is there no way to make the formatting of (2) format on a keystroke by keystroke basis and show up in the form properly formatted on a keystroke by keystroke basis?

This seems to be some very basic functionality that a product that has a long life such as FileMaker Pro should have without having to kludge around the limitation.

Any further help appreciated.

Link to comment
Share on other sites

The calculation field used to display you formatted phone number operates the same as any other calculation in FM. It is not re-evaluated until you exit from the text field on which it is based, not on a keystroke basis. Since it is a calulation, it really has to be this way. Think about how you would evaluate any calculation in general on a keystroke by keystroke basis (addition, booleans, etc.). It really doesn't make sense to use up processing cycles evaluating a general expression until the user is finished performing entry. Even in the case of phone numbers, you can't know how to format one until the whole number is entered (if then).

-bd

Link to comment
Share on other sites

  • Newbies

So the way it should work is:

a. (1) HomePhone and (2) HomePhoneFormat fields

b. Superimpose the two fields and give them identical color, text size,

etc. properties.

c. Arrange so that (2) is on top.

d. Set tab order so (1) is immediately before (2)

e. When you tab into (1) it comes to the front; you can edit if you like

f. When you tab out of (1) you will immediately enter (2) which will

then become active and come to the foreground to cover (1) and this

will show the proper formatting.

g. Correct?

Still for a mature product it would be nice to specify:

Phone number , type character length=10 and have a way to store a

format set that will always add the "(", ")", and "-" characters in

the correct position as in VFP. Not a lady canine but an observation. I think

that FileMakerPro is an excellant product, but I have yet to see a

product that can't be tweaked a little here and there.

Thanks to all that replied. I'll get this transition yet.

:-) Bob

Link to comment
Share on other sites

  • Newbies

Re: my last post.

This does not work. If I do not edit homePhone field then it skips the format field and the unformatted field stays on top. How can I make sure that the format field is always evaluated and displayed? The format field is the next field in the tab order.

Thanks,

Bob

Link to comment
Share on other sites

A couple of things:

"editable field is the first and the hidden calculated field is second"

The editable field (hidden, HomePhone) is the one that is stacked behind the calculated field (HomePhoneFormat). I don't think the calculated field (HomePhoneFormat) needs to be in the tab order at all, you don't enter into it. If HomePhoneFormat (front field) is set to not allow entry in Field Format, clicking on the stacked fields will send you to the back field and allow entry.

-bd

Link to comment
Share on other sites

To Bob Hartung

I can't agree with you more about File Maker weekness in this area. I have used it since 1986 and put in suggestions many times and most of them ignored. Seems that the big buzz features (Web etc.) are bigger sellers for Filemaker. This feature you posted about could have been easily treated with a script that was executing on out of focus (exiting the field) however with Filemaker you need to purchase a plugin to be able to accomplish this. Get used to it...

Link to comment
Share on other sites

Live Oak

(Got the dig...we both aren't youngsters any more!)

Overlooked this simple trick, however this does not negate the fact that FileMaker should allow execution of a fscript upon exiting from a field (not a plug-in) I still think that this is a major issue.

"good thing come to those who are willing to wait a very long time"

Link to comment
Share on other sites

quote:

Originally posted by wirehaed:

Live Oak

(Got the dig...we both aren't youngsters any more!)

Overlooked this simple trick, however this does not negate the fact that FileMaker should allow execution of a fscript upon exiting from a field (not a plug-in) I still think that this is a major issue.

"good thing come to those who are willing to wait a very long time"

I can only add: "good thing come to those who are willing to wait a very long time" cool.gif" border="0

Link to comment
Share on other sites

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