Hide any empty columns

Hi, is there any way to hide any empty columns in a layout, I have a quite long form response, just because there are many options so there’s like 230 fields, but most of the time they aren’t being filled in, so is there a way to hide them if they are blank/empty

hi @Nechemya_Rosenzweig , welcome to the community!

I am sorry to bring you the bad news: we cannot hide or show columns using functions.

Cheers, Christiaan

@Christiaan_Huizer, thanks for your quick response, so is there a way around this? Or a way you could recommend to view form responses in a better way?

hi @Nechemya_Rosenzweig ,

That is a good question. Often tables with many columns can be grouped by a theme. In the example below I show via a canvas function what is possible, maybe others can chime in and show their ideas as well:

Nechemya_Rosenzweig.ForEach(
  
  Format("{1} {2}
Transport type: {3}
{4}
{5}    ",
  currentvalue.Name,
  present.Name,
  transport._Bold(),
  ListCombine(busstop,trainstation,carparking).
    Filter(CurrentValue.IsNotBlank()).NumberedList(),
  extraInfo,
  LineBreak()
  ).BulletedList()
)

As you can see I apply the format function and the main part is the Listcombine and which I bring together related subjects and filter out on values that exist - IsNotBlank()

I hope it helps, cheers, Christiaan

Hi again @Christiaan_Huizer, the example you gave is useful but more if you have multiple responses, I simply have many columns with only 1 row of responses and am not looking to compare results, but rather give a more simplified view of the result I get from one form, and make it into a client profile for each individual response.

I’m guessing as you said, there is no Isnotblank for every column without typing each field in manually, and there are over 200 fields, so it would be rather tedious

hi @Nechemya_Rosenzweig

thanks for your feedback, you are right there is no elegant solution for your challenge with 200+ columns and when you update something, you have check your set up again.

One may wonder if a table with 200 columns is the way forward. As you know, Coda is a row based solution, not column based and when using a form, we feel the tension. To deal with that we can combine columns that provide alike input as you see in my blog:

The suggestion I make in my blog is time consuming as well, there are not short cuts when dealing with forms.

Cheers, Christiaan