Apr 04, 2019 08:37 AM
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?
Apr 04, 2019 08:50 AM
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.
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...
Apr 04, 2019 09:12 AM
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?
Apr 04, 2019 09:28 AM
I changed that “0” to a “1”, and still no change to the URL field.
Apr 04, 2019 09:32 AM
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.
May 29, 2019 02:25 PM
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!
May 29, 2019 08:19 PM
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
{A}
, which is a hidden field in the published view{B}
in the published view{Show URL}
then field {B}
should be defined as a formula field with the following formula:
IF(
{Show URL},
{A}
)