PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → Is there a better way to saved linked information than window procedural variable?
Is there a better way to saved linked information than window procedural variable?
Iniciado por rdnkjdi, 27,ene. 2016 21:32 - No hay respuesta
Publicado el 27,enero 2016 - 21:32
I have two tables that are linked with a child / parent relationship using the parent id field in the table analysis.

Index Books
|__Index Book Group

Browsing the index books - pressing "Modify" button on an Index Book opens up linked Index Book Groups

Open(WIN_IndexGroups_Browse, IndexBooks.IndexBooksID)


Inserting a new Index Book Group uses this code to save the new Index Book Group with the parent ID.

ScreenToFile()

// If it's a new record
IF IndexGroups..NewRecord = True THEN
IndexGroups.IndexBooksID = WIN_IndexGroups_Browse.pIndexBooksID
HAdd(IndexGroups)
ELSE
HModify(IndexGroups)
END

// Return value of the window
MyWindow..ReturnedValue = True


This feels dirty to me. Am I missing something - is there a better way to do this by specifying new edit records should inherit linked parent record fields?