BookmarkSubscribe
Choose Language Hide Translation Bar
restonian
Community Trekker

Small Bug in my Radio Box Script

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

0 Kudos
1 ACCEPTED SOLUTION

Accepted Solutions
bthaby1
Community Trekker

Re: Small Bug in my Radio Box Script

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);

  );

);

0 Kudos
3 REPLIES 3
bthaby1
Community Trekker

Re: Small Bug in my Radio Box Script

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);

  );

);

0 Kudos
restonian
Community Trekker

Re: Small Bug in my Radio Box Script

Thanks bthaby, it worked liked a charm.

0 Kudos
bthaby1
Community Trekker

Re: Small Bug in my Radio Box Script

Your welcome.

0 Kudos