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.

Script step to automatically check a checkbox

Featured Replies

What is the script step (is there one?) that will automatically check a checkbox?

Thanks.

Hello Ronald,

A checkbox correspondes to a particular value in the field in question, so to check the checkbox, you must enter that value into the field (adding it to any values that are already there).

There are several ways to do this, but the most obvious would be via the use of the Set Field[ ] command. For instance:

Set Field [YourField; YourField & Left(¶; Length(YourField)) & "thevalue"]

will check a checkbox which is assigned 'thevalue' in a checkbox field named YourField. :

Just set that field to the value.

Checkbox

Green

Blue

Yellow

Set [fieldCheckbox] = "Green" & "Yellow"

  • Author

Thanks for the replies. I "think" I did it as you described, but it's still not working.

I have a field called "LetterSent" in a file called high_schools. The choices are "Yes" and "No".

I have added the following step to my script:

Set Field [high_schools::LetterSent="Yes"]

Is that not correct? I'm using FM7. Perhaps there's a script step option that needs to be set?

Thanks again.

After that step, add Commit Record/Request (in v6 its Exit Record/Request).

Steve

Edited by Guest

Hi,

Well unless you want users to be able to select both Yes and No at the same time, checkboxes would be unsuitable for the field in question - you'd be better off with radio buttons (which prompt the user for an either-or selection).

Notwithstanding that, it looks as though the syntax you're using is not what one would expect to see (eg you have an equals sign in the middle, which perhaps indicates that you have set the entire definition into the formula dialog.

I'm attaching a quick example so you can see how it should be set up. :

Check.zip

  • Author

Nope, the commit record command didn't do anything.

  • Author

Cobalt...

Thanks for your help. That worked perfectly.

R

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.