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.

A script to uncheck a certain checkbox

Featured Replies

could someone please give me the code to write a script that will uncheck a certain check box. i have a check box called "to print" I select this so I know I need to print that record, but after I have printed I have to go back and manual click on all the check boxes i had already printed. Is there a way i can find all the checked "to print" check boxes and deselect them all at once? please be specific step by step i have no idea what i am doing. i know how to click find and then select the to print check box and it brings up all the records where to print is checked. hope this all makes sense. any help would be greatly appreciated. :

If the check box field only has the one item "to print" then setting the field to "" will clear the check box.

It there is more than one checkbox then use the Substitute() function to remove the value from the string. Be aware that the value is paragraph delimited.

Substitute( 

"¶" & checkboxfield & "¶" ; 

"¶" & "to print" & "¶" ; 

"¶" 

)

  • Author

that does not work. first of all where do i enter this code? there is no where i can just paste this code? i dont know what you mean about paragraphs? Is there a more simple code that makes sense to people who dont do basic programming. I goto scripts then i goto manage scripts then i get a screen of the scripts i click new script and i get a window with a side panel of all these functions i can double click on. it does not allow me to paste the text anywhere? also to me it would make more sense if the code made sense to me like If checkbox is checked then clear check box. end if. and i need the script to go through all of the records and search for these check boxes. you know? i dont think your code you gave me will work with my specific file unless you explain it in more detail to me. for starters do i simply copy and paste the code somewhere in my fm application. if so where? i am really looking for someone to give me the exact code i need. if you cant then explain to me what i need to fill in the blanks with. There is only one checkbox that needs to be uncleared.

Edited by Guest

print script checked boxes, then uncheck

keep in mind you would have to change this script to match your checkbox field and whatever value list you are using for the checkbox, as well as directing the scipt to print what you want.

Enter Find Mode [ ]

Go to Field [ checkbox::printed ]

Insert Calculated Result [ checkbox::printed; 1 ]

[ Select ]

Perform Find [ ]

Loop

Go to Record/Request/Page

[ First ]

Print [ ]

Go to Field [ checkbox::printed ]

Set Field [ checkbox::printed; "" ]

Go to Record/Request/Page

[ Next; Exit after last ]

End Loop

  • Author

i dont want to actual print anything. that will already be done. i just want to uncheck all the check boxes for "to print" can you please bold or italic all the things i need to change . and let me know please. this is very confusing to me. is there a way to copy and paste this script into fm? how do i do that?

  • Author

could someone please get back to me on this post?

Try this...

1) Show all records

2) Click that check box

3) From menu: Records >> Replace Field Contents... >> Replace with calculated result: Specify

4) Insert simply "" ( two quotes )

5) OK

6) Replace

Note that this 6 steps process can be fully scripted and that you must try it on a copy of your DB because it is not "undoable"

When ( and If ) it will be good for you, we 'll create that script.

  • Author

you are a genius. thanks so much! this was simple and it worked.

Ok, so now we'll create a script.

Scripts >> Manage Scripts >> New

1) Give it a name ( something like Uncheck )

2) DobleClick "Show All Records" ( under Found Sets )

3) DoubleClick "Replace Field Contents" ( under Fields )

4) While the Replace... is active, select:

a ) Perform without dialog

b ) Specify target field ( choose the name of your checkbox field )

c ) Specify... ( the button under the first specify )

d ) Replace with calculated result >> Specify >> double quote ( "" )

e ) OK

f ) OK

You can fire that script by clicking its name ( under Scripts Menu ) ,

or

by pressing CTRL + 1,

or

by attaching that script to a button

  • Author

you are great finally someone on here gives the exact answer i was looking for!! thank you for understanding me! your the best! :(

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.