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

Can one, through script, program a routine that "disables" an entry into field or checkbox?

For example: If a record has a status of "1" (open) checkbox 1 can be checked, if status is "2" (locked) checkbox 1 can not be checked.

In VB this would be written: If textboxA.text = "Open" then

check1.enabled = "True" else check1.enabled ="False" End if

I am trying to allow or not allow field entry depending upon the record status WITHOUT creating additional forms.

Any ideas??

In Field Format there's a checkbox that will allow entry into a field. Uncheck that so that there's no entry into the field.

Then create a button the same size as the field and put it under the field. Now when the user clicks on the field, they invoke the script specified by the button.

Code that script like this:

If [ RecordLocked ]

Beep

Else

Go to Field [ MyField ]

End If

As a result, when the record is not locked, they end up in the field much like they would expect. They'll never realize they bypassed the field, clicked a button, and the button put them in the field.

Instead of the beep, you could even have it throw up a message explaining to them that the field is locked.

Well, that's one way... the smart guys may know a better way.

HTH.

Sounds pretty smart to me! I see that I can also use that for other things. Thanks much. I LOVE gleaning information from other people's questions

If you look in my Handy Bits file (RussCalcs from Oz) in the samples section of this forum, there is an example under the Text Tab of how to do this using field validation by the contents of another "locking" field.

This way, when a record or field has been "locked", you cannot edit the contents. You can also expand this concept to locking the field after a certain number of hours since the record was created.

  • Author

Your handy bit solution appears to be the closest I can get to a background code without an additonal layout. This there a method to change the background color of the locked text box or check box through this method?

Thanks for your help

Yes - if you look at the "Colours" tab of the file, you will see how you can store colours in a repeating global field - and then use these to fill other calculated container fields to provide background colurs depending on other field values.

For your situation, create a calculation (container) field to place behind the field you want to lock. Make the field you want to lock transparent. Make the container field not to allow user entry and format it to expand to fill and un-check maintain proportions.

Using the field names from the file, the calc would then be:

Case(txt_Locked Status = "Yes",

GetRepetition(col_g_dv_Colour Backgrounds,2),

GetRepetition(col_g_dv_Colour Backgrounds,8))

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.