Help

Re: Hide information in cell if checkbox checked

2485 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Isaac_Winkler
5 - Automation Enthusiast
5 - Automation Enthusiast

I have a base for a video library which, among other information, contains fields for URL’s to the videos and two “checkbox” fields; one for “sharable”, and one for “sharable with restrictions”. I’ve created created a view to show just the “Sharable” and “Sharable with restriction” videos. I want to share this view with others, but I don’t want them to see the URL’s for the records marked “sharable with restrictions”, only the other information associated with that record. Is there a way to hide just the URL if the “sharable with restrictions” box is checked?

6 Replies 6
Mike_McLaughlin
8 - Airtable Astronomer
8 - Airtable Astronomer

One approach:

create a ‘URL’ field, hide it
create a formula field ‘URL-filtered’ with an IF statement to look at the check box field and the URL field.

5f73751092c6afb3485d0dfe997b3809227f5002.png

Formula field reference

For an overview of formula fields, please refer to the Guide to Formula, Lookup, Count, and Rollup fields. Formulas may involve functions, numeric operations, logical operations, and text operation...


Isaac_Winkler
5 - Automation Enthusiast
5 - Automation Enthusiast

I thought I did this right, but it’s my first time using formulas in this way on airtable, and I’m not getting the results I want. I created a formula field, and entered the following formula: “IF({Sharable w/ restrictions}=0,BLANK({Share link}))”. Nothing changed, but the formula was not rejected either. I noticed there is both a “formula” and “formatting” tab under the formula field. When I click the formatting tab it reads “Your result type is not a number or a date. Formatting options are currently only available if your result type is a number or a date.” Is this true across airtable, or just for the free accounts?

I changed that “0” to a “1”, and still no change to the URL field.

Isaac_Winkler
5 - Automation Enthusiast
5 - Automation Enthusiast

I figured out a solution for what I wanted to do. Thanks for the help. Took me a little while to really wrap my head around this functionality.

Scott_Campbell
4 - Data Explorer
4 - Data Explorer

I am having the same issues using this format - IF({Sharable w/ restrictions}=0,BLANK({Share link}))”… Isaac_Winkler how did you overcome this issues. Thanks!

You’re having problems because that’s not a valid formula. (Or, rather, it is a valid formula; it just doesn’t do anything).

The solution @Mike_McLaughlin proposed was pretty much the inverse of what you’re trying to do. First, keep in mind that an Airtable formula affects only the fiekd in which the formula occurs. That is to say, you currently can’t write a formula in field {A} that would hide or reveal field {B}. What you can do — and this is what Mike suggested — is to put a value in field {A} — in this case, the URL — and then either duplicate (and thus reveal) it in field {B} or not duplicate it and thus leave field {B} blank. By hiding field {A} in the view released to others, this has the effect of being able to toggle URL visibility.

So, assuming

  • the URL is entered into field {A}, which is a hidden field in the published view
  • the URL is either revealed or not in field {B} in the published view
  • URL visibility is controlled by checkbox field {Show URL}

then field {B} should be defined as a formula field with the following formula:

IF(
    {Show URL},
    {A}
    )