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.

Range find with case statement

Featured Replies

I have set up a find using global fields. In the example below I would like to search the size of something.

The calculation I used resulted in an error that says this number cannot be evaluated and I dont know why.

Here is the case statement:

Case (

(IsValid ( F_Size_Low ) and IsValid ( F_Size_High )) ; "(F_Size_Low) & "..." & (F_Size_High)";

(IsValid ( F_Size_Low ) and IsEmpty ( F_Size_High )) ; "(F_Size_Low) & "...50";

(IsEmpty ( F_Size_Low ) and IsValid ( F_Size_High )) ; ""0..." & (F_Size_High)"

)

The first test says that if both are valid then search the range.

The second say that if the low is valid and the high is not, search the range from the valid low to 50.

The third says that if the high is valid and the low is not search the range from the high to zero.

Where did I go wrong?

Thanks,

Drew

Picture_24.png

Edited by Guest

There are a couple problems I can see right off the bat. 1. Don't use IsValid() for this purpose, instead use 'not isempty()'. Second, your quotes aren't matched up correctly; in fact, quotes aren't needed around field names.

Anyway, you can probably simplify the calc a bit:

Case (not isempty ( F_Size_Low ); F_Size_Low; 0) &

"..." &

Case (not isempty( F_Size_High ); F_Size_High; 50)

  • Author

Thanks for the reply. That worked great. I am just starting to get in to doing calucalations and appreciate the help. I thought you could do the "not isempty" but could not find it in the help file (which is suprisingly helpful).

I want to make sure I understand the calculation correctly.

Case (not IsEmpty ( F_Size_Low ); F_Size_Low; 0) says that if Low has somehting in it then use that value but if not then use 0.

Case (not IsEmpty( F_Size_High ); F_Size_High; 50) says that if High has something in it use that value otherwise use 50

Is this correct?

Thanks for your help

Drew

Ya sure. You could also write it like this:

Case (isempty ( F_Size_Low ); 0; F_Size_Low) &

"..." &

Case (isempty( F_Size_High ); 50; F_Size_High)

  • Author

Thanks for the reply... I was wondering why was the IsValid not an ok way to go?

IsValid() is meant for checking the type-match of the data or that a relationship is intact, not for checking if a field contains information. You might check the function description in the application Help.

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.