I have around 15 columns in my spreadsheet wi...

expressions
(Simon Blackburn) #1

I have around 15 columns in my spreadsheet with columns K-P only used occasionally depending on the contents of the cell in colum A of that row.

As it is now, these column headers show in my app even if there’s no data in the column itself. How can use an expression to only show these columns if there’s actually data in it for that row?

Thanks

(Grant Stead) #2

You would have to turn off the show if universally, and then play with the show if settings

(Aleksi Alkio) #3

Unfortunately you can’t show/hide column headers in table view with a formula. Think it like this… if you have one column with values 1 or 2. How the app would know should she show the column header or not if you write the formula like [_THIS]=1.

Using the Show_If formula for form or detail view is a different story, because you are showing the data record by record.

(Simon Blackburn) #4

Yes, it the detail view I need this to happen in.

As you can see from my screenshot, there are two columns at the bottom that don’t contain any data. If there’s no data in the cells then I don’t want these to show, it just looks untidy.

I have the ‘show if’ turned off globally as you advised in previous help.

(Aleksi Alkio) #5

I believe your fields are not totally blank. If the field is blank, the app should never show that field in detail view what ever the Show_If contains or what ever is the option’s status.

(Simon Blackburn) #6

Oh right. Column ‘Break’ is a virtual column using the concatenate formula with a ‘-’ as you can see. The cells the concatenate formula are linking on the sheet side have a vlookup formula in them.

Would this be why?

(Aleksi Alkio) #7

Correct. If you have a string “-” in your cell, it’s not blank and therefore it’s showing the field.

(Simon Blackburn) #8

Is there any expression I can use so that if the cell only contains the string “-”, it doesn’t get displayed.

(Aleksi Alkio) #9

Think it in opposite way… if your value is blank, don’t add that “-”. For example… if your column has appformula like CONCATENATE([ColA],"-",[ColB]), you could write CONCATENATE([ColA],IFS(ISNOTBLANK([ColA]),"-"),[ColB])

(Simon Blackburn) #10

Worked flawlessly. Thanks again.

(Aleksi Alkio) #11

You’re welcome