Hide field based on another fields value

Hi - I know this is super basic but somehow I can't find guidance... keep coming back to the showif help article. I have a table with fields "stage" and "canceled date". I only want "canceled date" to then show if the stage is set to canceled. I set the Show If formula for the "canceled date" field to [Stage]  = "Canceled". Formula checks out, but canceled date is showing no matter what stage is selected. 

Screen Shot 2023-03-13 at 10.00.54 PM.png

Solved Solved
0 13 658
1 ACCEPTED SOLUTION

Show_if only affects the visibility of each record's value, in a collection view, not the column as a whole. This appears to all be working correctly.

View solution in original post

13 REPLIES 13

Is it because you spelled cancelled wrong, or rather 2 different ways? Does the field show up if there is not a show_if formula? 

Thanks for the reply. I actually intentionally used 2 "L"s in the spelling throughout the app because Google Docs auto corrects it to that spelling and I wanted to be consistent with the documentation I'm providing in docs:

Screen Shot 2023-03-14 at 10.08.15 AM.png

Yes, the field shows without the show if formula applied. I'm wondering if show if isn't intended to be used this way?  I have a similar post about using show if to hide a field from all but one user. The help article mentions that as a use case but not really the example in this post. 

Is [stage] a basic text field? Or perhaps it's a Ref, in which case the key value stored may be different than the displayed Label.

Any edit_if? Show some screenshots of the situation?

In the column fields go to the field you want to hide/show and use a formula in the show field instead of the check box. The but this code in there

in("Cancelled", [stage])

That will show the field if the word cancelled shows up anywhere in that field. 

She said that [stage] is an Enum. Using IN() would not be appropriate.

Stage is an ENUM field with an initial value set to 'New Deal' and 'Canceled' is in the list of value options. The only other expression on Stage is an initial value of "New Deal", which is working. 

Screen Shot 2023-03-14 at 10.45.09 AM.png

Canceled Date is a date field with the show if formula 

Screen Shot 2023-03-14 at 10.44.18 AM.png

Hmm, that's a mystery. What does testing the expression [stage]="canceled" show?

Same result, but I just realized that it shows the canceled filed only on the table view. When I click on a record that has stage New Deal, the cancel field is not in the detail view or the edit view! I do have the apply show if universally checked. When editing the record, if I change the stage to canceled, the field appears, as it should. 

What? So, it works now?

Not on the table view for some reason. Its showing when it shouldnt in the main table view but if you click a record in that table the detail view opens and its not there. Not there when you edit that detail view either. 

I am using a slice for the table view but that shouldnt matter, right? Its still the same field with the same expression applied just pulled into the slice. 

Screenshots please.

not to confuse things but I've since renamed canceled to 'canceled and invoiced', updated stage enum values and show if formula on canceled and invoiced field to account for new naming convention

1. the table showing the column although the stage is new deal (grouped by stage above)

Screen Shot 2023-03-14 at 4.57.20 PM.png

2. the detail view on that first record does not have the canceled and invoiced field (I covered the actions above the detail, hence the white space)

Screen Shot 2023-03-14 at 4.58.31 PM.png

3. edit view of that record also does not have canceled and invoiced  

Screen Shot 2023-03-14 at 4.59.48 PM.png

Show_if only affects the visibility of each record's value, in a collection view, not the column as a whole. This appears to all be working correctly.

Top Labels in this Space