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.

calculation causes circular definition?

Featured Replies

Hello,

An apparent simple thing causes me some headache; I have following 3 fields: "COST", "DISCOUNT" and "DISCOUNT IN %"

I want to either enter a $$ amount into field "DISCOUNT" and then get the percentage result of that $$amount related to "COST",

OR enter a % amount into field "DISCOUNT IN %" and then receive the $$ amount in field "DISCOUNT".

What I did:

enter calc for "DISCOUNT" = ("COST" * "DISCOUNT IN %") ./.100 and

enter calc for "DISCOUNT IN %" = ("DISCOUNT" ./. "COST")*100

When I do this I get the message that this would cause a circular definition after I enter the second calculation. Is there any way around this?

Thanks,

Andy

The easiest fix is to have two sets of fields and then stack them. Have two regular number fields for discount and Discount In %, and then two calculated display fields cDiscount and cDiscount In %

calc for "cDISCOUNT" = case(isempty(DISCOUNT), (COST * DISCOUNT IN %) /100, DISCOUNT)

calc for "cDISCOUNT IN %" = case(isempty(DISCOUNT IN %)(DISCOUNT / COST)*100,DISCOUNT IN %)

Set the field options for the calculated fields to NOT allow entry, and then stack the calculated fields over top of the entry fields. The display fields will show the calculated value, but when you click on them you will actually be entering/editing data in the entry field underneath.

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.