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.

Question Mark in Calculated Field

Featured Replies

I have a calculated field that tests for the presence of the word "Guard" in a text field. If present, the word "SEALED" is inserted into that calculated field. And that works...but, if the word Guard is not present, the calculated field shows a question mark instead of being empty.

Here's the calc I'm using (result text, do not evaluate..., do not store...):

If ( PatternCount ( Electronic Recording::Caption: ; "Guard" ) ; "SEALED" ; Electronic Recording::SEALEDtranscript )

Thanks,

Kevin

What is in the field Electronic Recording::SEALEDtranscript ? If you just want the calc field to be blank, couldn't you replace that with just ""?

  • Author

I described that poorly, and have edited my original post.

The "Sealed" field is calculated. I want the word "SEALED" to appear in the "Sealed" field if the "Caption" field contains the text "guard".

Thanks,

Kevin

What do you want in the Sealed field if the caption field does not contain Guard?

If ( PatternCount ( Electronic Recording::Caption: ; "Guard" ) ; "SEALED" ; Electronic Recording::SEALEDtranscript )

This calculation says if the Electronic Recording::Caption field contains "Guard" then insert "SEALED" if not insert the contents of Electronic Recording::SEALEDtranscript

Does the test for "Guard" work?

Is "SEALED" being entered correctly and if the Recording::Caption does not contain "Guard", is that when the question mark appears?

If so then it is coming from Electronic Recording::SEALEDtranscript

Not sure if you copied and pasted directly from your calc field but there does appear to be a stray colon int there after Electronic Recording::Caption

If ( PatternCount ( Electronic Recording::Caption: ; "Guard" ) ; "SEALED" ; Electronic Recording::SEALEDtranscript )

That could cause problems

I've done a simple test and was able to recreate the "?" when the result of the calculation is NOT set to text. Are you certain that you set it to a text result?

Enclosed example.

test.fp7.zip

  • Author

Thanks, Ron and Keith.

Yes, Ron, there actually is a colon in the field name. The calc works fine when the word "guard" is found. When nothing is found, I want the field to remain empty.

Keith, the calculation is definitely set to Text.

Thank you both for your time.

Kevin

When nothing is found, I want the field to remain empty.

Then make the calculation =

If ( PatternCount ( Electronic Recording::Caption: ; "Guard" ) ; "SEALED" )

---

BTW, is it correct to assume that SEALEDtranscript is the name of the calculation field in question?

Edited by comment

  • Author

Thanks again, comment. That works perfectly, which once again proves that "less is more". And yes, SEALEDtranscript is the calc field.

Thank you all for your time and help.

Kevin

And yes, SEALEDtranscript is the calc field.

I believe the way you had it originally is called recursion since you are asking the calc field to call on it's self if the other field does not contain "Guard". But by calling on it's self you are asking it to run the calc again. And again, and again, and so on because it is impossible to produce a result. Like endless Russion dolls.

  • Author

So you're saying it was in some sort of infinite loop? That's not good!

Have a great day,

Kevin

I believe the way you had it originally is called recursion

I believe it's called circular reference. Or infinite loop.

So you're saying it was in some sort of infinite loop? That's not good!

LOL, I was just posting the above. No, it's not good. Though in most cases Filemaker's built-in protection kicks in after a while and saves you from crashing.

I stand correected. Circular reference, thanks comment :)

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.