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.

Lock out field after you choose from a drop down

Featured Replies

Hey,

I have two fields, one that you enter a dollar amount, and one that categorizes it. I want to make it so if you choose "zero" or whatever from the drop down list of categoriies, then it automatically places the amount "$0.00" in the dollar amount field (and locks you out).... and if you choose something else you can place a new dollar amount... how do I do this?

Thanks

There is an event plug-in (free) that would let you run a

script as you exit the category drop down...

You could run a sript that freezes the window,

sets the amount field to $0.00 and switches layout to an identical

layout, but in this one select field behavior & uncheck

the access to the amount field.

Dan

There are several ways to handle this, including validation and Extended Privileges. You have FM7 and a plugin isn't necessary here at all.

The simplest way is this: Set your Amount field to Auto-enter calculation of: If(Category = "Zero"; 0; Amount). Be SURE to unclick the box (auto-enter tab) under calculated value 'Do not replace existing values.'

In this way, if a User selects Zero from popup, the amount will display 0. Users can change it if they wish BUT ... it won't matter because it will immediately change back to 0 as soon as they leave the field. If your popup displays anything else, the amount can be changed and will stay changed -- until they again change the popup to zero.

I think this is friendlier than using validation or extended privileges because it eliminates that unsettling FM error message. I prefer to simply fix it for them.

i also think your version is friendlier even

if it does not "lock" the user out.

  • Author

It works like a charm... thanks..

  • Author

Oh, one other thing.... how do I do that for multiple conditions (add a second if statement)?

It depends upon what you wish to accomplish. A few examples, expanding on the original of If(Category = "Zero"; 0; Amount):)

If(Category = "Zero" or DifferentText = "Yes"; 0; Amount)

If(Category = "Zero" or not IsEmpty(DifferentText); 0; Amount)

If(Category = "Zero" and DifferentNumField < 3; 0; Amount)

If this doesn't do it for you, let us know the specifics and we'll give you the calc. If you want your Amount field to contain more than two possible results, you'll have to switch to a Case() or Choose() calculation.

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.