My Radio Box script is:
Panel Box("Pick a record type", rbox = Radio Box( {"CLA", "CLD", "CNT", "FN2", "FRA", "MDB", "MDC","MIS", "UTI", "VLR" },
rb = rbox << Get Selected ),
Problem: If the user deosn't make a selection, that is, leaves the Radio Box at the default "CLA" , the variable rb is blank. If the user selects any other record type from the list, the correct value is assigned to rb.
Thanks!
Rob in Reston
Try setting it on the first pass. . rb = rbox << set(1);
See example below.
getrb = expr(
rb = rbox << Get Selected;
show(rb);
);
rb = "";
show(rb);
NewWindow("test",
PanelBox("Pick a record type", rbox = RadioBox({"CLA", "CLD", "CNT", "FN2", "FRA", "MDB", "MDC", "MIS", "UTI", "VLR"},getrb),
rb = rbox << set(1);
rb = rbox << Get Selected;
show(rb);
);
);
Try setting it on the first pass. . rb = rbox << set(1);
See example below.
getrb = expr(
rb = rbox << Get Selected;
show(rb);
);
rb = "";
show(rb);
NewWindow("test",
PanelBox("Pick a record type", rbox = RadioBox({"CLA", "CLD", "CNT", "FN2", "FRA", "MDB", "MDC", "MIS", "UTI", "VLR"},getrb),
rb = rbox << set(1);
rb = rbox << Get Selected;
show(rb);
);
);
Thanks bthaby, it worked liked a charm.
Your welcome.