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.

having a script run when checkbox is checked

Featured Replies

Hi everyone.

I am working on creating a little tasks application for my work. In my task layout, I have all the fields that I need and the bottom part of the layout, I have a portal that shows all the tasks including the one that I am viewing. In the portal I show:

taskid taskname startdate duedate Status Completed? Delete?

001 check email 4/19/2004 4/19/2004 Open &

Now, the completed? shows the checkbox that allows users to check and uncheck. The delete shows a little trash can to delete the task. So far the checkbox works and my trash can works. So when I have 001, 003, 004 and 005 and I am viewing 003 and check 005, it does what is supposed to do. The problem is my Status Field, it needs to change automatically to closed. I wrote a script that checks the completed? field and if it is checked it setfield to "closed" if not setfield to "open". This works too. Now when I attached the script to the checkbox, everything goes haywire and the checkbox sometimes checks all my records and sometimes unchecks others. I tried adding a field with the script attached to it behind the checkbox but it is hard to access it if you do not place the cursor right outside the check box. Is there a clean and easy way to run my script to change my field Status to "Open" or "Closed" when the checkbox is checked?

Thanks

You can see a screen shot of my Tasks layout at:

http://www.valley-programmers.com/porganizer.asp

FileMaker Version: Dev 7

Platform: Windows XP

One way to turn a checkbox field into a button that can be scripted is to place a rectangle over it. Once you've got the rectangle positioned over the checkbox, make sure its fill and border are both set to transparent. Then drag down Format to Button... and set it up to perform the script.

I made & attached a quick sample you can examine for the methodology. This method can also be used inside portals, but don't forget to add the GTRR (Go To Related Record) script step.

Checkbox.zip

  • Author

Thank You very much. I will try that.

Robert

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.