Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

Infected:

Welcome to the Forums. There's no such thing as a dumb question.

To check a checkbox in a script, use SetField(yourfield, value), where yourfield is the field you are entering data in, and value is the value of the checkbox. In other words, if you've got a field named "MyField" in a layout, and the checkboxes are set to "Yes" and "No", and you want to check off the "Yes" box, your SetField statement would look like this:

SetField(MyField, "Yes")

Setting a field to Checkbox or Radio Button is just a layout choice. The underlying data is comma-delimited actual data. To see what's really happening, put a regular textbox of the same field next to your checkbox field. As you check things off, you'll see they appear in text in the textbox...

HTH

-Stanley

Posted

I have a very strange problem, i have previously tried the "YES" method and it hasn't worked for me. So i reversed the method, left it checked and change the script to "NO" it does uncheck it.

works one way and doesn't the other way.

any ideas?

Posted

Hi, infected! I'm not sure it matters in this particular situation, but I'd just double-check (pun!) to make sure that the "YES" in the script is exactly the same as the "YES" in the field or valuelist. I've had problems on the web where a field had YES followed by a return character or space or something and it did not work right. Sometimes things like that matter, sometimes not... but try to make sure it is EXACTLY the same (upper/lowercase, spelling, extraneous characters before or after, etc.).

--ST

Posted

Infected:

Make sure that you're setting the field to the EXACT value of one of the checkboxes. Otherwise you won't see the data in the field if it is formatted as a checkbox. However, some data will definitely be there. I can't remember if checkboxes are case-sensitive, but I believe that they are. So, if you're setting the field to "YES" and the checkbox says "Yes" then the checkbox will remain unchecked.

So, my advice to you is the same as what I wrote before. Put a regular text field of the same field next to your checkboxes, observe what happens when you check the boxes, then observe what happens when you run your script. The problem should become clearer then.

-Stanley

This topic is 7433 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.