Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted (edited)

For ease of explanation, let say I am creating a checkbook register. I have two fields "Credits" and "Debits".

What I want to happen is if I already entered a value in the "Credits" field and I then put a value in the "Debits" field the value in "Credits" would be removed or vise versa.

I have tried many attempts using auto enters and calculations but to no luck. Any direction would be most appreciated.

Thanks

Edited by Guest
Posted

Hi

the AutoEnter/Replace calc for debits is:

Let(

fieldName = Get ( ActiveFieldName ) ;

Case(

fieldName = "debits" ; debits ;

not IsEmpty ( credits ) ;""

)

)

the AutoEnter/Replace calc for credits is:

Let(

fieldName = Get ( ActiveFieldName ) ;

Case(

fieldName = "credits" ; credits ;

not IsEmpty ( debits ) ;""

)

)

BTW: if you wish to show a zero and not an empty field simply substitute the line:

[color:red]not IsEmpty ( credits ) ;"" with:

[color:blue]credits ≥ 0 ; 0

and the line:

[color:red]not IsEmpty ( debits ) ;"" with:

[color:blue]debits ≥ 0 ; 0

Posted (edited)

Thank you that work perfectly. I think I tried almost that very thing but I used it as an if statement.

Edited by Guest

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