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.

Redefine a field based on criteria

Featured Replies

I have a field set as a pop-up list with two options for billing people: "Hourly" and "Flat Fee". Then I have a number field called "Fees" in another table.

What I would like to happen is if I choose "Hourly" as the billing type, then the Fees field is a calculation of an HourlyRate * NumberOfHours (each of those is specified in other fields).

If I choose "Flat Fee" for the billing type, I would like to be able to enter whatever amount I want in the "Fees" field.

So, if the billing type is "Hourly" the Fees field need to be a calculation and if it is "Flat Fee" it needs to be a regular field.

Is this possible?

Thanks for your time.

Set your Fees field as an auto enter calc with Do not replace exisiting unchecked. Then make this the auto enter calc for that field.

Evaluate(Quote(If(BillingType = "Hourly"; RelatedHourlyRate; ""); BillingType)

What this does, is everytime your pop-up list is changed, it updates that calc, it will either be an hourly rate, or blank. If it is blank, type in what you want in there.

  • Author

Thanks for you responses guys.

Zero, when I enter yours FM say "Too many parameters in this function" and highlights the semicolon before BillingType) at the end.

Thanks also Lee, however, I need to be able to enter my own values in the Fees field rather than one overall value for a flat fee, because I need to break out different parts of a job into different line items.

Set your Fees field as an auto enter calc with Do not replace exisiting unchecked. Then make this the auto enter calc for that field.

Evaluate(Quote(If(BillingType = "Hourly"; RelatedHourlyRate; ""); BillingType)

What this does, is everytime your pop-up list is changed, it updates that calc, it will either be an hourly rate, or blank. If it is blank, type in what you want in there.

Thanks for you responses guys.

Zero, when I enter yours FM say "Too many parameters in this function" and highlights the semicolon before BillingType) at the end.

Thanks also Lee, however, I need to be able to enter my own values in the Fees field rather than one overall value for a flat fee, because I need to break out different parts of a job into different line items.

Evaluate(Quote(If(BillingType = "Hourly"; RelatedHourlyRate; "")); BillingType)

:

  • Author

I guess I should ask...

If I want it to calculate the Hours * HourlyRate, is that what I put in your equation where it says RealatedHourlyRate?

Thanks.

Yes, put in whatever calculation you want to in there.

Could be like Table1::Hours * Table1::HourlyRate

will work fine.

  • Author

Cool. It is working.

However, it is not letting me enter a number. It says "This field cannot be modified."

I have it set as a decimal number field, with the enter in browse mode set. Is it because it's a calculation that it's not letting me enter anything?

  • Author

oops, I'm dumb, nevermind. I had it set as a calculation rather than a number that auto-calculates.

Thanks!

Thanks also Lee, however, I need to be able to enter my own values in the Fees field rather than one overall value for a flat fee, because I need to break out different parts of a job into different line items.

These fields are modifiable? However, you can use the basics of this to set up a Auto Enter, which can then be overridden if you want.

I modified my sample file to show how you can do this using the Auto Enter.

See the second layout and the field named a_charge to see how this can be set up.

HTH

Lee

BillingSelect.fp7_2.zip

  • Author

Cool. Thanks guys. I got it working.

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.