Hello! Question - is there a way to programm...

Chris_Rea
Participant I

Hello!

Question - is there a way to programmatically set the “Hidden” column

value?

Specifically, I have a budget app, with individual columns for each year/month values, and would like to not show months that have passed.

I can use the ShowIf calculation to determine if the values of the column are shown or not, but if I don’t show the values of the columns, the column headers still show, taking up space on the screen.

Any thoughts?

0 5 362
5 REPLIES 5

Apply the same showif condition to headers

Chris_Rea
Participant I

i’m fairly new, so may be missing something - the header looks to be baked into the column itself.

So I’ve set the ShowIf app setting on the column, and hides the data, but that does not hide the column header when showing the data in a table?

and if I tinker with the “Display Name” value for that column (to try to hide it if needed), I can get the header value to go away, but the column is still there on the screen.

Lynn
Participant V

Hi @Chris_Rea You

could create a slice to only show the columns you want.

Chris_Rea
Participant I

@Lynn - true, but in this case it would get cumbersome pretty quickly.

for instance, this month I should see columns for Nov '18 - Dec '20.

next month I should only see Dec '18 - Dec '20, and so on, incrementally removing columns as we go forward.

I can manually set the column in question to hidden each month as we go forward, but am hoping there is a way to do this programmatically.

I thought about the slice option, but it would require 26 slices (one per month through Dec '20), and then would require some shenanigans to have the view automatically pull the correct slice.

HI @Chris_Rea, normally, you’d want your app to have a fixed column “structure” as your data changes. You shouldn’t (or at least, it works well if you don’t!) set it up so that it has new columns every month.

Instead, add the month as a column and label individual rows with the month value. Then you can simply decide to filter out the rows from older months — using a security filter (to me more efficient) or a slice (if it is just a presentation filter).

Top Labels in this Space