Jump to content

Formatting text based on a checkbox


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

Recommended Posts

This seemingly simple problem is stumping me.

Basically, I have a Checkbox and I have some text (not a field, just some text on the table). I want to set it up so that when the checkbox is NOT checked, the text is invisible (that is, the same color as the background) and when it is checked, the text is bright red.

This seems like it should be easy (and it may turn out to be) but I cannot seem to find any way of checking if a particular checkbox is checked or not. Any help would be appreciate. Thanks.

Link to comment
Share on other sites

That thread doesn't quite apply - this question is simpler.

First, format the text when it's selected with the arrow tool, NOT the text tool. Make it the same color as the background so it's invisible.

Now apply conditional formatting, give it the red color and use a formula like this:

myTable::myField = 1

I.e., the name of your checkbox is "myField" and it has a value list of 1. This can even be written simply as:

myTable::myField

The "= 1" is implicit and may be omitted.

Of course if your checkbox's value list is say "elephant" then you'd use the formula:

myTable::myField = "elephant"

Link to comment
Share on other sites

This is assuming that the checkbox only has one value in it. I wasnt sure if the OP was using a checkbox with only one value so I thought it would make more sense to point them to your post since most beginners usually use checkboxes with multiple values.

Link to comment
Share on other sites

I appreciate all this help. For Mr_Vodka's solution, I had seen that thread before, and couldn't get it to work. It wasn't until a little while ago that I realized that it required the text to be exactly the same as the Value list item. This is how it's working for me right now (and yes, it only has 1 value in it).

As for Fitch's result, while it seems like it is much simpler, and looking at it, it should work just fine, for some reason, it won't... my Value list item (the only one) was:

Urgent

my checkbox's name was URGENCY in the purchases table, and when I entered this Conditional formatting formula:

purchases::URGENCY = "Urgent"

It should work, but still no love, and I'm not sure why. Perhaps I'm missing something, but I have it working for now using Mr_Vodka's solution. Could it be because the checkbox is a text field set to Display as a Checkbox set? Is there another way that I'm missing? I'm not sure. Anyways, I thank you both again for your help.

Edited by Guest
Link to comment
Share on other sites

If your field only has one value in it, I would recommend you using a value list called flag which has a value of 1 instead of "Urgent" (which Tom has already recommended).

You can reuse this value list with other checkboxes and it helps when doing reports with summaries etc.

If you do choose to use a value list of 1, you can simply have your conditional formatting (formula is option) as your field purchases::URGENCY since it will either be 1 or null.

Link to comment
Share on other sites

  • 1 month later...

Hey Tom,

I have a similar problem. I have a single value Option list that I want to be visible only when otherfield1=otherfield2. I set the text properties to be invisible by default, like you suggest.

I can get the conditional formatting to work for making the text of the option list appear, but I don't see how to apply the conditional formatting to the option's circle so it is appears too.

Is that possible?

Thanks.

Link to comment
Share on other sites

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