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.

The "and" operator not working

Featured Replies

Hi

i am trying to product a calculation that would only show an asteric if  field 1 is filled and field 2 is empty.

if field any other combination i don`t want it to show. for some reason it is not working .

see calculation below

field 1 = Ingredeint_Production 3::date

field 2 = Ingredeint_Production 3::Approved

 

( IsEmpty ( Ingredeint_Production 3::Approved ) and  not IsEmpty ( Ingredeint_Production 3::date ) ) or 
IsEmpty ( Ingredeint_Production 3::date )

 

Any idea whee i went wrong and why the first calculation is not working as expected.

i would appreciate some support , thanks in advance.

 

take control of the order of precedence so that you are not surprised.

You have:

if[ A and not B or C]

do you mean:

if[ (A and not B ) or C]

or do you mean

if[ A and ( not B or C ) ]

or do you mean

if[ A and not (B or C )]

...

 

  • Author

i only have A & B

the second statement is beacuae it is in a portal and i don`t want it to show if no record exists. (would achieve this in first statement when i get it right)

i need 

5 minutes ago, Smiley said:

field 1 is filled and field 2 is empty

 

35 minutes ago, Smiley said:

i am trying to product a calculation that would only show an asteric if  field 1 is filled and field 2 is empty.

If that's what you want, then your calculation should look like this:

If ( IsEmpty ( Field1 ) and  not IsEmpty ( Field2 ) ; "*" )

and nothing else.

The test that you have:

IsEmpty ( Field1 ) and  not IsEmpty ( Field2 )  
or
IsEmpty ( Field2  )

will also return true whenever Field2 is empty, no matter what Field1 contains (or doesn't). Logically, this is equivalent to:

 IsEmpty ( Field1 ) or IsEmpty ( Field2 )  

 

35 minutes ago, Smiley said:

for some reason it is not working .

"is not working" is not a good description of a problem. You should say: Field1 contains X, Field2 contains Y, the expected result is Z, actual result is W.

 

Edited by comment

2 hours ago, Smiley said:

i am trying to product a calculation that would only show an asteric if  field 1 is filled and field 2 is empty.

Hi Smiley!

Is this only for display?  Instead of creating a calculation field, you might wish to use a Hide calculation instead.  This would eliminate an unnecessary calculation field.  Just type the asterisk as text into the portal top row then apply a hide calculation of:

not IsEmpty ( child::Approved ) 
or
IsEmpty ( child::date )

 

2 hours ago, Smiley said:

the second statement is beacuae it is in a portal and i don`t want it to show if no record exists.

The above example should work for you ( please see attached file )

fields.fmp12

BTW, the IsEmpty ( child::date ) could be further shorted to boolean (if you wish) of :  not child::date since dates are numbers and any number would return True.

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.