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?
scott
September 1, 2019, 1:54am
2
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
scott
September 1, 2019, 2:02am
4
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?
scott
September 1, 2019, 2:08am
6
i know its possible, I just can not remember how to do it. See if you can adapt this to do that @salvuccicarlos
VIDEO
Ok, so I coded something like this:
“== null” and “== 0” won’t work
scott
September 1, 2019, 2:44am
8
2 Likes
How about toggling a class, which provide a when condition, rather than styling?
Teodor
September 1, 2019, 9:18am
10
Indeed, the easiest and cleanest way to do this is to just assign classes which style your element. Check the docs explaining this please:
Dynamic attributes in Wappler give you powerful option for dynamically binding attributes like - image sources, href attributes, names, input values etc., as well as show/hide or disable elements on the page, based on specific dynamic condition....