Replace if null

So, I’m working with tables and I’ve wanted to replace a cell’s text if it’s null.

In the screenshot should be the first row (on “cierre” column)

I’ve tried using replace method but couldn’t work it out correctly.

I don’t know how to use the conditional method:

Isn’t any kind of conditional like: if something… then… for this values?

You can do a Dynamic Attribute default I think.

Dynamic Attributes > Display > Value > General > Default > Default Value

That should show the actual value and if empty the default value I believe.

1 Like

The Display > Value option doesn’t appear

Ok, in that case, click on the lightning bolt by the Inner Text and go to General > Default and see if you can put a default option there.

1 Like

Excellent! That worked perfectly.

If there any option to apply a custom style to the row if that value is null?

i know its possible, I just can not remember how to do it. See if you can adapt this to do that @salvuccicarlos

Ok, so I coded something like this:

image

“== null” and “== 0” won’t work

I’m not sure then. I do not have a lot of familiarity with styling, much to my regret. I think @Teodor would be able to help more after the sun rises and he has a cup of tea with honey in it. :honeybee::tea::face_with_hand_over_mouth:

2 Likes

How about toggling a class, which provide a when condition, rather than styling?

Indeed, the easiest and cleanest way to do this is to just assign classes which style your element. Check the docs explaining this please:

Thanks!!