PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → [WD19] - Show empty table cell if zero value
[WD19] - Show empty table cell if zero value
Débuté par JP, 28 juil. 2014 12:18 - 10 réponses
Posté le 28 juillet 2014 - 12:18
Hi All,

I have a table control and some values are zero. How can I not show anything in a table cell if the value is zero? I thought this was done by setting the column "Reset is zero" or perhaps "NULL if empty" checkboxes but this seems to have no effect and the zero values display anyway. Is it possible?

TIA
Posté le 28 juillet 2014 - 14:17
Hi TIA,

I solved this so far by adding a table column (text type), then converted the respective values to text and displayed them in this column - if zero then format to "".
The original column is hidden and used for Holding the original values.

reset if Zero seems not to work in tables

Erik
Posté le 28 juillet 2014 - 14:41
Hi Erik,

You can also use the "On row display" event to set a numeric column or a date column to "" and it will give the same result as you said. It's not required to have a separated column.

Best regards,
Alexandre Leclerc

PS: If I'm not mistaken, this problems occurs when you havve a data table directly linked to a query or table. Then it looks like the check box is not taken account of. But on the row display event you can manually "fix" this. I never thought to send a bug report on that one.
Posté le 28 juillet 2014 - 14:41
Hi TIA <img src="/NG2013_WEB/ui/smiley/6.gif" align=absmiddle border=0 alt=";)"> (and JP)

Tested it in WD16, and checking "Reset if zero" does work here.

Maybe a new feature in V19 ? ;)

Bart
Posté le 28 juillet 2014 - 14:49
HI Bart,

You joke but I think you might be right becuase I was so sure that the "Reset if zero" did actually show a blank if the value was zero. This is where my thought came from. But it doesnt work now anymore :/
Posté le 29 juillet 2014 - 08:07
Hi

I can confirm that the 'Reset if zero' option works as advertised in WD19: on a table column which has the type set to Numeric, and the table is linked to the database. Just had occasion to do this recently.

Christopher
Posté le 29 juillet 2014 - 08:07
Hi Alexandre,

thanks for the info, indeed I am using tables directly linked to qeries most of the time.
Will try your approach the next time.


Erik
Posté le 29 juillet 2014 - 14:08
Hi Christopher,

Thank you for confirming this. I know this does not work for a date column - and setting to empty manually is the way we use to fix the problem.

Best regards,
Alexandre Leclerc
Membre enregistré
14 messages
Posté le 02 janvier 2020 - 03:21
I need to hide a cell in a column under a certain condition for example, if another field has a 1 in it.. However the cell is a Checkbox and I can't seem to find any way to make it disappear on certain rows. My table is a memory table
Membre enregistré
14 messages
Posté le 02 janvier 2020 - 13:01
I can do everything I need except make the checkbox disappear on certain rows. Seems like there should be come way of doing this.
Membre enregistré
14 messages
Posté le 02 janvier 2020 - 14:56
I don't believe it can currently be done so I'm going a different route