Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Hide/Show Checkbox Conditional Formatting

Featured Replies

Hi,

I'm hoping to divine a way to achieve the following:

If a particular condition is met, a checkbox will be displayed, otherwise, "invisible".

I'm familiar with using conditional formatting to achieve this type of result with text fields, etc., but of course, conditional formatting cannot be applied to the line attributes of a checkbox.

Any ideas?

Thanks!

Value is "Empty"?

It sounds like you really want to hide a layout element - which can't be done with conditional formatting. Search on the forums for how to hide a field/object.

  • Author

It sounds like you really want to hide a layout element - which can't be done with conditional formatting. Search on the forums for how to hide a field/object.

Thanks. Yes, I'm aware of the differences here. I've seen some folks do some fairly creative things with CF (which I hadn't been aware of before), so I thought I'd check to see if someone has figured out something clever for a checkbox. As it is, I can achieve the result by creating additional fields/objects and using them together, along with some scripting. I was just hoping for something more elegant.

Value is "Empty"?

Not sure what you mean here. The result I'm after is that the line attributes of the checkbox (the "box" itself) be visible only when certain conditions are met. Can you elaborate? Thanks!

If I'm understanding your need, I'll make you a sample later. I'm with a client now, and have an appointment at 1:30 out of the office. so it will be awhile.

Lee

BTW. please update your profile to reflect your current version of FileMaker. Here is a quick link My Profile

Just to clarify, are you wanting the checkbox to be completely gone, or just look un-checked?

Depending on your background, you could lay a text object over your checkbox, give it an invisible background color, then conditionally apply a background color that matches the background behind it.

  • Author

If I'm understanding your need, I'll make you a sample later. I'm with a client now, and have an appointment at 1:30 out of the office. so it will be awhile.

Lee

BTW. please update your profile to reflect your current version of FileMaker. Here is a quick like My Profile

Thanks. Looking forward to your sample. I've updated my profile as you suggested.

  • Author

Just to clarify, are you wanting the checkbox to be completely gone, or just look un-checked?

Completely gone. Here's the sit: client has rows of records in a list. Depending on data in certain records, client needs to see an (initially empty) checkbox next to a field in that record. So, eg., if "name" = A or B or C, checkbox, otherwise, no checkbox.

Depending on your background, you could lay a text object over your checkbox, give it an invisible background color, then conditionally apply a background color that matches the background behind it.

Let me try your suggestion. I do have alternating background colors in the list, but I think I can conditionally format for those using Get (PortalRow) or Mod (Get (RecordNumber) ), etc. Thanks.

For conditionally displaying objects I usually use a hidden (invisible) tab control. Create two tabs, one for your condition and one for everything else. When the condition is met navigate to the conditional tab. Of course, this requires that you scrip this process.

For conditionally displaying objects I usually use a hidden (invisible) tab control. Create two tabs, one for your condition and one for everything else. When the condition is met navigate to the conditional tab. Of course, this requires that you scrip this process.

Do you use an OnRecordLoad layout script trigger to refresh the active tab when switching records?

Before we do a lot of speculating on your need, try looking at some examples at Database Pros by doing a search for Visibility and/or Conditional Value Lists to see if there is something there that is an example of what you need

Lee

  • Author

Hi Lee,

I've searched the examples at Database Pros but did not find anything relating to checkboxes. The techniques shown there are all from version 7 or earlier, btw. Did you have a chance to create the sample you mentioned earlier? Thanks.

  • 5 months later...

I'm only 6 months late :)  but what I do for this stuff is create a field called "_dummy" in every table - as it's fields that can be controlled by CF.

This field contains no data, data cannot be entered, and can be used multiple times on any given layout. Depending on the condition, I just make the dummy field the same as the background color of the page - or whatever it's sitting on. I also make sure the cursor does not change to a pointer otherwise the location is given away.

 

The only drawback I've found is that if it's got a tab stop then it can be selected under the dummy field - but it's no biggie. Hope this helps. I'm happy to draw up a sample if you like.

 

Greg

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.