PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → For each with table and checkbox
For each with table and checkbox
Iniciado por marcov, 26,nov. 2020 12:40 - 3 respuestas
Miembro registrado
56 mensajes
Publicado el 26,noviembre 2020 - 12:40
I found this example code that I adapted to my table, but info always gives me the same table value and it doesn't change with every interaction, where am I wrong?
the checkbox is not a field of the database but a "virtual" field of the table

Sub is int
FOR Sub =1 TO TableCount(TABLE_QRY_TabTrasn)
IF TABLE_QRY_TabTrasn.COL_SELE[Sub] = True THEN
// Process the selected row
Info(TABLE_QRY_TabTrasn.COL_Importo)
END
END

thanks
Publicado el 26,noviembre 2020 - 14:40
you are missing the [sub] on the info line... without it, you are always displaying he value of the currently selected line, and your code is not changing the selection
Miembro registrado
56 mensajes
Publicado el 26,noviembre 2020 - 16:51
thanks
:thank you:
Miembro registrado
4 mensajes
Publicado el 28,noviembre 2020 - 13:54
TAMBIEN pueds utilizar

FOR each row of TABLE_QRY_TabTrasn
if COL_sele then
trace(COL_Importo)
end

END