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.

Forcing entry to a field but not until later

Featured Replies

I have a field in a record (a "customer complaint handling form")that is in the second layout and must contain a value before the record can) be closed(or Archived) but this field might not be entered for months before closing (Archiving) the record. I need a script that will allow filemaker pro 6 to close without this field having a value, but the record (customer complaint form) cannot be closed (Archived) until this field contains a value. Is this possible and if so can someone give me an example script.

Thank you for any help.

Josh

I assume that you have some sort of script in place for the "Archive" or "Close Complaint" process. Add a few lines to the top of that script:

If (IsEmpty(YourField))

.. Go to layout (Wherethefieldis)

.. Go to field(YourField)

.. Show message ("Can't proceed until you blah blah")

.. Halt script

End If

  • Author

Thanks Fitch Ill try this.

Thanks again

I will post back with the results.

Josh

  • Author

This works perfectly. What could I add and where do I add a subscript or step in this script that will allow me to do this with more than one "forced entry before archiving" field. (4 to be exact)

Thanks,

Josh

Just click the first line of the above script, then shift-click the last line, then click the Duplicate button 3 times. Then go back and change the field references, and the message if need be, and you're all done.

  • Author

I figured it out.

If (IsEmpty(YourField_1))

If (IsEmpty(YourField_2))

If (IsEmpty(YourField_3))

If (IsEmpty(YourField_4))

.. Go to layout (Wherethefieldis)

.. Go to field(YourField)

.. Show message ("Can't proceed until you blah blah")

.. Halt script

End If

Thank you once again Fitch,

Much appreciated.

Josh

  • Author

If (IsEmpty(YourField_1))

or

If (IsEmpty(YourField_2))

or

If (IsEmpty(YourField_3))

or

If (IsEmpty(YourField_4))

.. Go to layout (Wherethefieldis)

.. Go to field(YourField)

.. Show message ("Can't proceed until you blah blah")

.. Halt script

End If

Sorry about that, I needed to have the "or" there for it to work.

No, that's not what I meant. The way you've done it, you always go to the same field, even if it's not the one that's empty. I like to minimize users' confusion, so even if it makes the script a little longer -- but actually easier to follow the logic, I think -- I would test for each field separately:

If (IsEmpty(YourField_1))

.. Go to layout (Wherethefieldis)

.. Go to field(YourField_1)

.. Show message ("YourField_1 cannot be left blank.")

.. Halt script

End If

#

If (IsEmpty(YourField_2))

.. Go to layout (Wherethefieldis)

.. Go to field(YourField_2)

.. Show message ("Please do something about YourField_2")

.. Halt script

End If

#

etc.

Well,

or doesn't exist in ScriptMaker.

It's a calculation syntax.

If (Is Empty(field1) or Is Empty(field2)....)

Besides, as this could be useful, you could also have this condition as a plain calculated field c_checkAllFieldsEmpty returning 1,0.

Then the script would simply be

If (c_checkAllFieldsEmpty=1)

The rest of your script.

Yep Tom.

You're leading the user to the empty field....

Just one question. Why is the Show Message step coming after the go to field. Would it always be selected after you leave the message box with "OK" ?

Ugo, you expect me to actually TEST these things? It should work either way, so it's more of an aesthetic choice. Note that I not only lead the user to the appropriate field, but each field can have its own message as well. And as I said, the script is longer, but simpler.

Hi Tom, neither did I ? wink.gif

Sure a long good script is better than a short bad script....

I just answered Josh assuming the condition was "4 fields empty", then go to another field. I should have read from the begining of the post.

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.