PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → How to pass / return list of elemens between forms or components?
How to pass / return list of elemens between forms or components?
Iniciado por guest, 17,may. 2015 16:26 - 2 respuestas
Publicado el 17,mayo 2015 - 16:26
Let's imagine we have a window/form A that we want to fill with information coming from a specific list of X customers, not all the customers we have in our DB.
We already developed a window B for customers management where you can browse all the customers, even with filters and master/detail feaures.
How can we call the window B from the window A in order to select (by a check column for example) a number of customer ad send them back to window A to fill its table?

The real scenario is that the user launch start menu exe (project 0) where he selects the module A (coming as component from project 1) and then open module B (coming as component from project 2) to build the list of customers.
3 project -> 2 components+1exe

Viceversa, how can I fill the browsing window B with a subset of customers passed as parameter from a window C?

I thought about:
1) build multimode windows acceptiong / returning parameters depending on the opening mode
2) pass/return "customer-class" objects or array of instances of a "customer-structure"
3) work with EXTERN structure variables
4) use shared memory zones

Thank you.
Publicado el 18,mayo 2015 - 09:08
Hi,

There might be a very simple solution ... adress the table in window A from window B like:

In window B you can work directly with (and in) window A like it is in window B ... as long you use the prefix for window A like

for each row of win_windowA.tableClients
IF win_windowA.col_clientboolean THEN
// do your stuff
END
END


I use this and it works like a charm.
Kind regards
Publicado el 18,mayo 2015 - 10:37
Hi Stefano,

if your windows A, B and C share the same HF context, then you can simply use the same query in all windows (lets call it QRY_customerselect)... You setup all the possible parameters you may need in the editor, fill the one needed based on the user action, set the others to null and run it, then you call the other window who know that QRY_customerselect is there and ready and just has to hreadfirst/next on it.



Best regards