Enable fields based on other fields

Hello Gliders,
I am wondering if there is a way to enable fields based on inputs to other fields. So for e.g. show field Color only if the entry in the Product field is Tshirt.
Thanks much!

Are you talking about adding/editing records, or just viewing them? I don’t think you can control fields showing or hiding when adding/editing, but when viewing a record, column values that are empty will not display.

I was hoping to use such a feature for adding/editing records. Certain columns only apply to certain product types and it makes the layout really clunky to have all columns display for all products irrespective of whether they apply or not. Having a feature to enable/disable columns would be great.

This feature is now available in case you weren’t aware.

awesome! thankyou!

1 Like

I am not sure how to use this. I only want the user to see items where the date (which is a column) is equal to today(). I can’t do this with the math column. I can’t do this in the google spreadsheet either since the formula would have to be copied into the new item row manually for every new item added.

What are you trying to control, a list or other components? You can control a list using a filter with the Within operator.

For your spreadsheet formula, you can auto populate rows using an arrayformula.

https://docs.glideapps.com/all/guides/quick-starts/intermediate-techniques/calculating-columns

Thankyou Jeff. The arrayformula worked for one of the issues I was having.
The feature of controlling ‘visibility’ of components for existing items is awesome. But how would it work for adding new items?

Same way it works with existing items. Just add a condition to the component.

I’m certainly am missing something. Let me explain. I have the following 5 components in my sheet

  1. Location
  2. of employees

3 # of desks
4. # of machines
5. # of widgets

For Location 1, I only want to show the components # of employees and # of desks
For Location 2, I only want to show # of machines and # of widgets
For Location 3, it should show all components

How would I accomplish this? Visibility feature is tied to only one component right now.

Can you create 2 of each employee, desk, machine and widget components? Then set conditions accordingly.
Location 1 will show first employee and first desk components
Location 2 will show first machine and first widget componets
Location 3 will show second employee, second desk, second machine and second widget components

I can’t create multiple components because i am working with many locations.

The way I was trying to do it is define which components to show per location in a seperate sheet - Locationdetails. Then when the user wants to adds a location item for a specific date in the sheet 'activity; it would lookup which components to show and which to hide based on the ‘show’ component in columns H-K in the activity sheet. Is there another workaround?

glideappspic1

This presents new difficulties. I’m going to go ahead and say it’s not possible to do the yes/no lookups in add/edit mode. Potentially it might be possible in detail view when using entry fields, but the record would already need to be added at that point. I had already attempted something like this with no luck and included a thread link below. Maybe if you could somehow encode 4 unique character combinations into your location name. So your location Choice Component would look like “Location 1 E-W-”. You could set you Visibility condition to use the Contains operator. If the location contains “E-” then show the Employees component and so on. That’s kind of the best idea I have for now.

Thankyou for suggesting this workaround. This worked perfectly. i used special characters instead of letters. The choice menu looks a bit strange with special characters at the end of the location name but we’ll live with it for now. Thanks again.

1 Like