Here's one way.
- Add a parameter
row_idonto view B. - When the button is pressed on A then navigate to view B and pass in the row_id.
- On view B create three custop props;
custom.name,custom.drawingnoandcustom.product. - Right-click on view B → Configure Events ... → onStartup → Script.
query = "SELECT name, drawingno, product FROM drawing_master WHERE id = ?"
params = [self.view.params.row_id]
result = system.db.runPrepQuery(query, params)
if result:
row = result[0] # Assuming only one row is fetched
self.custom.name = row["name"]
self.custom.drawingno = row["drawingno"]
self.custom.product = row["product"]
- Create property bindings from your components to the custom properties. Make them bidirectional.
Now you have eliminated all the parent.parent.getChild().getChild() stuff and it won't break if you move components in or out of containers.