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

I have a calculation using the position function to scan a field for certain verbiage. The calculation is exactly as follows:

If ( Position ( ReportType; "URAR" or "multi" or "SFR" or "condo"; 1; 1) ≥ 1; "Full Report"; If( Position ( ReportType; "Desk"; 1; 1) ≥ 1; "Desk Review"; If (Position (ReportType; "Field"; 1;1) ≥ 1; "Field Review"; "Other")))

In my data, one of the possible field values is "Final Inspection - 1004D" that returns "Full Report" for the calculated field. Can anyone give me some idea how this is possible? Shouldn't it be an "Other"?

The expression:

"URAR" or "multi" or "SFR" or "condo"




evaluates to 0 (False), because none of the words are True. And since 0 does appear in "Final Inspection - 1004D"...



Try something like =




Case ( 

Position ( ReportType ; "URAR" ; 1 ; 1 )

or

Position ( ReportType ; "multi" ; 1 ; 1 )

or

Position ( ReportType ; "SFR" ; 1 ; 1 )

or

Position ( ReportType ; "condo" ; 1 ; 1 ) ; "Full Report" ;



Position ( ReportType ; "Desk" ; 1 ; 1 ) ; "Desk Review" ; 



Position ( ReportType ; "Field" ; 1 ; 1 ) ; "Field Review" ; 



"Other"

)

  • Author

The expression:

"URAR" or "multi" or "SFR" or "condo"

evaluates to 0 (False), because none of the words are True. And since 0 does appear in "Final Inspection - 1004D"...

say what? if I'm understanding correctly, because my result for my first test is 0 (zero), and 0 (zero) appears in my data, it's now TRUE...and thus "Full Report"?

No, not exactly. Your first test is:

Position ( ReportType; "URAR" or "multi" or "SFR" or "condo"; 1; 1) ≥ 1




This test evaluates as True, that's why you are getting the first result - "Full Report". 

I was trying to explain why the test evaluates as True. 



To make a long story short, you cannot use "or" this way; you must place the "or" operators in-between STATEMENTS, not between ARGUMENTS.



For example, this is correct:




A = B or A = C




but this:




A = B or C

makes C a statement on its own. The result will be true when A = B OR when C by itself evaluates as True (e.g. when C is a number other than zero).

  • Author

No, not exactly. Your first test is:

Position ( ReportType; "URAR" or "multi" or "SFR" or "condo"; 1; 1) ≥ 1




This test evaluates as True, that's why you are getting the first result - "Full Report". 

I was trying to explain why the test evaluates as True. 



To make a long story short, you cannot use "or" this way; you must place the "or" operators in-between STATEMENTS, not between ARGUMENTS.



For example, this is correct:




A = B or A = C




but this:




A = B or C

makes C a statement on its own. The result will be true when A = B OR when C by itself evaluates as True (e.g. when C is a number other than zero).

I see what you mean. My mistake. Thank you!

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.