Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

I need to format a field that will autoenter a small text (PC) if the user doesn't insert a number. I can write small scripts and follow instructions on those that aren't too complicated.

Posted (edited)

Let we have field A and field B. And you want that field B will be ="PC" if field A is empty? Or no.

If such you can make field B calculation field or AutoEnterCalculated. If not please tell in example.

Edited by Guest
Posted

I get very uneasy feelings when putting text into number fields. I know in vs. 7, text APPEARS to be ignored in number calculations. But it still throws off Counts and Averages and may come back to bite you. And if you use boolean in any of your number calculations, text is an Integer and can mess your calc up by producing true (or 1). Also, I have no idea how vs. 4 handles numbers. I would think through carefully whether this is worth mixing your numbers with text.

It might be wiser simply to display a calculation over the top of the field. You would leave your number field alone then create a calculation (text, unstored) with:

If( IsEmpty( num ) , "PC", "" )

Set this calculation to not allow entry in Browse (in Field Behavior) and set it's fill and pen patterns to transparent. Select your number field and Arrange > Send to Back. Then select both fields (by holding down shift), then Arrange > Set Alignment > Center To Center. :D

LaRetta

Posted

I want PC to be entered into the field if it is left blank. I have a sort of fix, I've got it where it puts it in there when the person prints if they have left the field empty. I would like it to put it in there when they tab out of the field if they have left it blank. I do not know if this is possible.

It will work okay the way I have it, but I would prefer it if it were simply automatic without anyone thinking about it. This is not a number field. It is used for a number but is often left blank and is not used in any calculations.

Posted

Don't give up so soon "trible a"!!! Develope your template in 6.0

and give it a whirl with this:

ftp://ftp.volftp.mondadori.com/pub/mac/data_man/filemaker/fmpreverter.sit

But I need to caution, that files tweaked this way are unstable, but for inspecting and learning a certain technique it just fits the bill!!

--sd

Posted

Howdy, sis! I would use a calc field as LaRetta suggests except I may not stack them and I'd set it equal to "PC" if field1 were empty or equal to field1 if not empty. Or, you could just set "PC" as the default value and let the user change it to something else if they have a value. Everyone's different, though, eh? So, go w/whatever works best for you.

--ST

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