I would use Data table subscripting in case like this
Names Default To Here(1);
dt = Current Data Table();
// present choices to user
nw = New Window("Add New Row Data",
<<Modal,
Panel Box("Row Data",
Lineup Box(N Col(2),
Text Box("Chamber ID"),
v1 = Number Edit Box(401.1),
Text Box("Pct WW Down (put 0 if CHx 100% up)"),
v2 = Number Edit Box(0),
Text Box("Reason"),
v3 = Text Edit Box("Enter Text Here"),
Text Box("Year"),
v4 = Number Edit Box(2023),
Text Box("Work Week"),
v5 = Number Edit Box(1),
Text Box("Scheduled or Unscheduled"),
v6 = Text Edit Box("Unscheduled")
)
),
V List Box(
Lineup Box(N Col(2),
Button Box("Click to Add Row", // this script runs when the button is pressed...
vals = {};
Insert Into(vals, v1 << Get);
Insert Into(vals, v2 << Get);
Insert Into(vals, v3 << Get Text);
Insert Into(vals, v4 << Get);
Insert Into(vals, v5 << Get);
Insert Into(vals, v6 << Get Text);
dt << Add Rows(1);
dt[N Rows(dt), {"CH ID", "Pct WW DWN", "Reason", "Year", "WW", "Sched/Unsch"}] = vals;
//{:CH ID = v1, Pct WW DWN = v2, Reason = v3, Year = v4, WW = v5, Sched/Unsch = "Scheduled"});
),
Button Box("Cancel")
);
)
);
Also hints might be useful with Text Edit Boxes for you (and if you want to force users to add something there, you have to handle that also)
Names Default To Here(1);
win = New Window("Example", text = Text Edit Box(""));
text << Set Hint("Enter your name");
-Jarmo