Empty text record shown

Hi!

I have an expression that splits text in two parts:

substitute(
index(
	split(
		concatenate(unique([Combined list])),
	concatenate([Current session number]," , "))
,2)
," , ",", ")

Sometimes the result is text that looks like this:

5,15, 34, 89

And sometimes the result is empty (nothing after the split).

My problem is that the record is shown even when nothing is in it. Iโ€™ve been able to hide such empty records with the following condition in the โ€œShowโ€ spot:

len([Name of column])<>0

Still, I wonder why AppSheet doesnโ€™t hide it automatically. Empty records are usually not shown.

0 6 252
6 REPLIES 6

Not sure what s happening, but did you try if this expression help ?

count(list([Name of column]))<>0

Thanks! I think that would work as a show condition too. Iโ€™m just not sure why I have to make a special show condition in this case.

I suspect the expression returns something blank space ish one which is treated as text value, but not count as list item when we turns to list from text with list() expression.
Out of my guess.

Steve
Platinum 4
Platinum 4

Try this:

substitute(
  index(
    (
      split(
        (" , " & unique([Combined list]) & " , "),
        (" , " & [Current session number] & " , ")
      )
      - list("")
    ),
    2
  ),
  " , ",
  ", "
)

Thanks for helping with this, @Steve!

Unfortunately, the problem of empty records being displayed occurs with your expression too:

3X_8_4_847aed1203f1ddb6aceac07e302e6161c92c0e6a.png

An additional problem is that an unwanted comma is added to the end of the strings with text in them:

3X_7_a_7ae22a8851aa3dafecdf50a8ff723e22fdcf5261.png

Iโ€™m happy with my current solution. The expression I wrote in my original post produces the text I wanted and the addition of the โ€œlen([This column])<>0โ€ expression as a show condition does what I need it to do. Iโ€™m just not sure why the show condition is necessary with both my expression and yours. If the text length is 0, AppSheet shouldnโ€™t show that column. Perhaps I should tell support@appsheet.com about this.

I just sent a brief e-mail about this issue to support@appsheet.com

Top Labels in this Space