Jump 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.

modifying a calculation field

Featured Replies

  • Newbies

Is it possible in any way to modify the value of a calculation field?

I'm trying to make the default value of my Labor Cost field the following:

Labor Cost(calculation, number) = Sum (Labor Line Items). This works fine, but I want Labor Cost field then be modifiable so it can be changed on my Invoice (which is another layout). I can't use an auto-enter field with a calculated value for Labor Cost because the Labor Line Item fields are based on some radio buttons and rate fields that aren't known when the record is created. Are there any known workarounds for doing this kind of thing? Thanks

You could use a scripted button using the Set Field function. When the user clicks the button, the Labor Cost field would be set to = Sum (Labor Line Items) i.e. the value at the time of the click. I have used this technique for an invoice total where the actual total on the invoice may not agree with the total that my database claculates due to some suppliers rounding up and others rounding down.

You can't modify a calculation, per se, but you can generate that effect. Create the following fields:

Labor Cost Entry (number)

Labor Cost (calculation, number) =

If(notIsEmpty(Labor Cost Entry), Labor Cost Entry, Sum(Labor Line Items))

For the effect on the layout, make the two fields the same size. Make sure Labor Cost is opaque. Stack Labor Cost directly on top of Labor Cost Entry. Uncheck the "Allow entry" box in the Format Menu --> Field Format dialog. This make the Labor Cost field "unselectable" (it already can't be modified). When you click on the Labor Cost field, the Labor Cost Entry field underneath it is selected. When you click out of Labor Cost Entry, the calculated result Labor Cost reflects the value you entered.

-bd

Create an account or sign in to comment

Important Information

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

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.