prissypan Posted February 11, 2004 Posted February 11, 2004 Hi guys, just wondering other than changing the values of checkboxes. Is there a way to automatically check a checkbox after performing a function. What i have on hand is to send confirmation letters to the customers after they have registered with our company. When i click on the "send mail" button, is it possible for Filemaker to update the checkbox field after sending the mail?
EddyB Posted February 11, 2004 Posted February 11, 2004 Hi, Yes this is possible, after sending mail in your script just add the following: Set Field[checkboxField, "Yes"] Obviously replace "checkboxField" with the name of your field and replace "yes" with whichever value you wish to be checked, Regards Ed
prissypan Posted February 12, 2004 Author Posted February 12, 2004 Another question though, where should i go to set the initial value of the check box?
EddyB Posted February 12, 2004 Posted February 12, 2004 If you want the checkbox to show an initial value on creation of a new record you need to set this up in define fields. Select the field in question and click on options. Under the auto-enter tab click onto data, in the box type which option you would like to be auto-entered. Regards Ed
prissypan Posted February 12, 2004 Author Posted February 12, 2004 Thanks Ed. I have yet another problem. I'm trying to create a find script to list out all the records which doesn't have the box checked. Somehow the script tht i've created is inconsistent, sometimes it fails to search correctly and retrieve the record which has already been checked. Another thing is when i select the search script there will be a prompt "There are no valid criteria" even when i have selected the check field. ------------------------------------------------- Here is what i have done so far. Go to Layout ["Data Entry"] Perform Find [Restore, Replace Found Set] Go to Record/Request/Page [First] Loop If ["mailStatus ="1""] Omit Record End If Go to Record/Request/Page [Exit after last, Next] End Loop Your help will be greatly appreciated. Thank you. Regards, Pris
-Queue- Posted February 12, 2004 Posted February 12, 2004 What search criteria is being 'Restored' in your Perform Find step? Your loop is going to skip one record after omitting the previous. Also, if all records are omitted, the loop will never end. Try this instead: Loop [color:"white"]__If [mailStatus = 1] [color:"white"]____Omit Record [color:"white"]__Else [color:"white"]____Go to Record/Request/Page [Exit after last, Next] [color:"white"]__End If [color:"white"]__Exit Loop If [not Status(CurrentFoundCount)] End Loop If you don't want want the error to show, you also need to add Set Error Capture [On] before the Perform Find step, and add If [not Status(CurrentFoundCount)] [color:"white"]__Enter Find Mode [ ] [color:"white"]__Show Message ["No records could be found."] [color:"white"]__Show All Records [color:"white"]__Halt Script End If after the Perform Find step.
prissypan Posted February 13, 2004 Author Posted February 13, 2004 Thank you Queue... The script worked great! =) Pris
prissypan Posted February 16, 2004 Author Posted February 16, 2004 Hi guys, yet another question from me. Is it possible to switch the value of the checkbox? After i've selected the checkbox, its value will be "N". How do i go about switchin it back to its original value of "" and then change the value back to "N" again later on? I have tried usin Set Field but after i use setfield to clear the checkboxes, the value seems to stay at the new value and i'm unable to change it back. Please help! Thank You
Recommended Posts
This topic is 7587 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 accountSign in
Already have an account? Sign in here.
Sign In Now