PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → Re: Computer columns in Table
Re: Computer columns in Table
Iniciado por guest, 15,dic. 2015 07:06 - 4 respuestas
Publicado el 15,diciembre 2015 - 07:06
Hello,

Can a computed column be added in a Table ? eg. I got two columns Rate and Quantity in File, but I want to display Amount (Quantity * Rate) in Table, which is not available in File.

Is this possible ? Can I display any computed columns in Table, which is not available in Files ?

Displaying from a query is possible, I think, but I prefer to display directly from File.

Happiness Always
BKR Sivaprakash
Publicado el 15,diciembre 2015 - 07:25
Sorry, some typo error in Subject. It should be computed column and not computer column.
Publicado el 15,diciembre 2015 - 09:15
Hi Sivaprakash,

It's very easy, just add a column not linked to the file and put the code in the "row display" section of the table code:
col_Amount=col_Quantity * col_Rate

Regards, Piet
Publicado el 15,diciembre 2015 - 10:26
Thanks Piet van Zanten for your reply. I'm new to WX, so please bear with my basic clarifications.

I'm adding Table control into a window and trying to add those columns from file.

I could add a new column without linking to any file, but couldn't find a way to define the 'calculation' part there in Table Control. Can I add it there or should I go with script alone ?

Hope I could call a function too, instead of the simple calculation.

Happiness Always
BKR Sivaprakash
Publicado el 15,diciembre 2015 - 10:30
Hello,

Thanks. I got it working.

Happiness Always
BKR Sivaprakash