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

Newbie Question about empty fields


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

Recommended Posts

  • Newbies
Posted

G'day I'm new to this and can not for the life of me find out what I'm doing wrong.

I have made a database the main dispatch form has a portal in it and I'm stuck on a few of the fields. What I want to do it multiply Quantity by the perunit1 price and put the result into perunit3 field for cash customers but I want the perunit3 field to remain blank if I don't enter a price into perunit1.

Don't laugh to hard but this is what I've tried so far.

If(IsEmpty(PerUnit1);"";"PerUnit3=Quantity*PerUnit1")

This always gives me $31 no mater what I put in the perunit1 field.

This one always gives me a total of $1

If (PerUnit1 ="";"";"Quantity * PerUnit1")

Can anyone help me out please?

Posted

You're not formatting the calculation correctly. Two errors.

1. You are applying quotes when you shouldn't.

2. You are writing out the "left side" of the equation, that is not how calcs are written.

You have apparently set the field type as number. That part is correct; but because of the quotes, you are basically asking "show me the digits you see in this string of text" and FileMaker is doing what you asked. It is returning the 3 and 1 characters.

No:

If(IsEmpty(PerUnit1);"";"PerUnit3=Quantity*PerUnit 1")

Yes:

If(IsEmpty(PerUnit1);""; Quantity*PerUnit 1 )

Or:

Case( PerUnit1; Quantity*PerUnit 1 )

  • Newbies
Posted

Only 2 things wrong is pretty good for someone that has no idea. I'm sick of the way I do dockets at work (everyone one is on an excel spreadsheet and a nightmare when trying to find an old order) but my lazy bosses won't come up with an easier way of doing it so I'm trying to do it on my own. Tried with Access but thats to hard. Filemaker pro seems a lot easier for someone simple like me. If I can get this all working I won't mind coming to work so much. Thanks again for all the help in info.

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