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.

Validate by calculation, other fields not IsEmpty

Featured Replies

Hi,

I'm new to all this, I would appreciate any help to my two questions.

I have a DB with many files. One of the files has a tabbed interface to different layouts. Once the user chooses ONE of the layouts and enters data there, I want to prevent entry into fields in the other layouts.

I thought of using a validation by calculation in the fields. That is: when entering data, calculation (IsEmpty?) checks whether specific fields in other layouts are empty.

How do I write that calculation?

Second, possibly related question:

One field in each layout (depending on which layout is chosen) is obligatory. When info is entered there, it does the above validation, and then I want it to automatically check a checkbox or radio button field, to record which layout was used. I need that for sorting etc.

How should I achieve that?

Thanks in advance...

Hi Alex,

First, I would reccomend that you consider using scripts/buttons to go between layouts, verify which layout has been used, and mark your checkbox. While I am not quite sure what your DB is doing, I suspect it will give you better flexibility and be easier to create, troubleshoot, and add to.

That being said, you could do this with auto validation calcs.

Given 2 Layouts and 4 text fields:

LayoutA

-field1

-field2

LayoutB

-field3

-field4

Set fields 1 and 2 to be validated by calculation:

isempty(field3) and isempty(field4)

Set fields 3 and 4 to be validated by calculation:

isempty(field1) and isempty(field2)

Second question- create calc field displaying result as number:

case(not isempty(field1) or not isempty(field2), 1,

not isempty(field3) or not isempty(field4), 2,0)

This will give you "1" for layoutA, "2" for layoutB, and "0" for neither. Format your checkbox accordingly.

Again, you are asking for problems with this method (at least with your first question). For example, say a user goes to layoutA, enters a carrige return accidently in field1, and then shifts to LayoutB and tries to enter in field3. The validation calc will give an error message because field1 is really not empty, and the user will probably be scrathing their head for a long time trying to figure it out. I would consider using scripts.

-Raz

IsEmpty( Substitute( Substitute( fieldname, "

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.