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.

Featured Replies

Hi there!

I've got a question which I figure will have a simple answer. I have a X field in which a user may enter a numeric value. I also have a Y field in which there already is a numeric value. What I need to do, is to limit the value of the X field to the Y one. I know that I could surely do this by creating a value list of some sort, but what I really need is when the user types in, for example, 28 in the X field and that the Y field contains 24, the X field will then be 24. On the other hand, if the user types in 13 in the X field and that the Y field still contains 24, then the X field will indicates 13.

Thanks in advance and let me say that this is truly the best FileMaker Forum ever!

Kroutchenkov

In the field definitions area for FieldX, use the Option for Validation. You want Validation by calculation. Tell it to make sure:

FieldX less.gif FieldY.

If you want it not to interrupt the data-entry person in FM6, you'd need a FieldZ for data entry, and turn FieldX into a calc which gives the Min(FieldZ,FieldY).

In FM7 you can have data entry automatically "fixed" by some calculation, but not in FM6, I believe.

ESpringer said:

In FM7 you can have data entry automatically "fixed" by some calculation, but not in FM6, I believe.

Yes, this can also be done in FM 6! ==> field definition dialog ==> Options ==> Validation tab: "Validated by calculation" (choose also "Strict" at the bottom, so the can't override your Y-Limit, and "Display custom message")

I believe E's referring to auto-enter calcs that overwrite (or 'fix') the original data. This is doable in <7 with some extra fields to hold the calculation, mod time, and trigger, similar to this post.

  • Author

Thanks a lot!

I knew it was as simple as that, but I didn't think a second about a validation! I'm ashamed...

See you!

Kroutchenkov

  • Author

Hi again!

The solutions you all provided to me are working fine, as long as I type values directly in the database. But when I import records from another database, the values imported do not seem to undergo the validation process until I manually change them. Is there a way to validate those imported values?

To be exact, I have an X database with a RESERVATION section that stores data in a RESERVATION2 database via a portal. There is a button in this portal that export the fields of the related records from RESERVATION2 to a TEMP file, record which is then imported via a script in a RENTAL database. Then, there is a relationship between that RENTAL database and the X database in which there is a portal in which are displayed fields of the related-imported record from the RENTAL database. In fact, the button transfers the current reservation to a rental. But when this reservation becomes a rental, I cannot validate the Quantity field, which is in the RENTAL database (join file). Is there a way to do so? Is that a script thing? I handled to add some script steps during the transfer, but there's a problem : the GO TO RELATED RECORD doesn't seem to work properly...

If my question isn't clear, please feel free to tell me. I am not a native english speaker, but I think things should be pretty clear even though.

I'm going to sleep on that... sometimes a bright idea just comes when we're not looking for it...

Thanks again!

I think ESpringer hit the nail on the head with the three-field solution. Does that not work, for some reason?

  • Author

Well, my database changed a lot with the above explanations and my problems are now away... My error was to try to validate the data when the record was imported, but it was much easier to validate it before it was even exported. This way, it works fine and saves me a lot of time when the validation is false, since the user doesn't have to process through the scripts!

Thanks a lot!

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.