Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Trouble with this auto-enter by calc....???

Featured Replies

I've got a table called Parts. This table includes fields for Cost, QTY, and a field call IsCredit that gets 1 or 0 if the record is a credit to our account or not.

The idea behind the check box is that if it's checked then the number in Cost needs to be negetive to reflect that in our actual cost of the item.

So as it stands now I have the Cost field set to the following auto-enter by calc.;)

If (

IsCredit = 1 ;

Cost * (-1);

Cost

)

The problem I'm having is that the calc. doesn't fire but every OTHER check of that check box. For example...

I have a record that I go ahead and check the box on. Then I fill in $5.00 for Cost and it correctly changes it to -$5.00 because IsCredit = 1. So far so good.

Then, I simply uncheck the box expecting the -$5.00 to turn back into positive $5.00. this does not happen, though. It simply stays -5. If I then check the box again right after that it changes the -5 to 5, but now it's positive 5 when the box is checked which is wrong.

I was under the impression that auto-enter by calc. would update anytime any of the fields involved changed. Is that correct? I've unchecked the "do not replace" option.

So I don't understand why every other check of the IsCredit check box is switching the value of Cost..?? If it's checked IsCredit should equal 1, in which case Cost should be a neg. value. If it's not checked then IsCredit does not equal 1, in which case Cost should be a positive value.

Any information on what i'm doing wrong here would be greatly appreciated. thanks!

Well, the second time you click the checkbox, it becomes 0. So the test IsCredit = 1 returns FALSE, and the result is Cost, i.e. no change in the current value.

I think a better approach would be along the lines of:

Case ( IsCredit ; - Abs ( Cost ) ; Abs ( Cost ) )

Note that this would prohibit negative credit - which could be desirable in some circumstances.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.