Jump to content

Auto checking checkboxes


prissypan
 Share

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

Recommended Posts

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This topic is 6555 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
 Share

×
×
  • Create New...

Important Information

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