Jump to content
Server Maintenance This Week. ×

How to clear a check box, after script has ran?


This topic is 1277 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I have a script to email a list of selected items, which works great!  But the check boxes stay checked after I run the query, how do I clear them??  With my other fields I simply do a  Set field [inventory::Email_Info ; "" ] and it clears out the data, that doesn't appear to work with my checkbox field.   This must be a simple fix to clear out all checks, but I can't figure it out, please help 😉

THANKS!!!!

 

 

 

Screen Shot 2020-10-26 at 11.33.47 AM.png

Link to comment
Share on other sites

Is Email_Info a global field? If not, setting it to "" will only clear it in current record. If you want to clear it in all records of the current found set, you will need to use the Replace Field Contents script step.

Note that marking individual records is not good practice. It adds an unnecessary modification of the record, and of course will fail in a multi-user scenario with one user overriding the selection of another. To select multiple records, add their IDs to a global field or a variable.

 

Link to comment
Share on other sites

It is not a global field.  I could easily do that and make it a global field it that will work.  There will be less than records in the inventory field.  So it is not a big database.

When I make it a global field all of the records in that database become checked at once, so I DO NOT want global field.

 

So how do I just clear all the records from being selected?  I don't want to have to manually uncheck them each time.

Link to comment
Share on other sites

17 minutes ago, 1FilemakerMan said:

So how do I just clear all the records from being selected?

As I said, by using  Replace Field Contents script step.

 

 

18 minutes ago, 1FilemakerMan said:

When I make it a global field all of the records in that database become checked at once, so I DO NOT want global field.

I am afraid you're missing the point. The idea is to add (or remove) the clicked record's ID to a list held in the global field (or variable). The user does not see the contents of this list. They only see a checkmark that's hidden or shown based on the presence of the record's ID in the list.

 

Link to comment
Share on other sites

Sorry but I am not understanding what you are saying, I am still new to FM.

I have a query that takes all records that have been checked and then writes them to a PDF file which is then emailed out, which is awesome :-)!
Then I simply need to uncheck the checked records, how is this not some simple line in a script?
 

Link to comment
Share on other sites

This topic is 1277 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.