Jump to content
Server Maintenance This Week. ×

Making a number field negative


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

Recommended Posts

  • Newbies

Hi everyone! I'm relatively new to filemaker but I think that what I'm trying to do is relatively simple.

I have a layout which I use to track cash. On one of the fields (Income_Expense) I have a drop-down list and either select "Income" if I want to record money that I received or "Expense" to record money that I have paid.

What I want to do is: When "Income_Expense" field is set to "Expense", then "Expense_Amount" field (which is the number field where I write down the amounts) is negative.

How do I write this statement??

Thanks!

Link to comment
Share on other sites

The best way would be to enter expenses as negative amounts. Otherwise you will have an awkward user interface that changes the actual user input. For example, user edits an existing expense sum (which is already negative) - should it now flip automatically to positive?

But, if you prefer, you could try making the field auto-enter a calculated value (replacing existing value) =


Let ( [

amt = Abs ( Self )

] ;

Case ( Income_Expense = "Expense" ; -amt ; amt )



)

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

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