parasol consultancy limited
0800 083 7663
parasol logo
 

SOLCASE TIPS - JULY 2007

USING CHOOSE-EXPR TO BUILD RADIO ButtON LISTS

Ever wanted to give users the choice of picking from a radio button list but wanted to get the answers from the database rather than a static list.

The sample code reads a field from a set of one or two screens in a group and gives the users a choice. To ensure that there are not too many to fit on the screen the code sets a maximum of 12 on the first screen. You can obviously modify the code to cope with higher numbers.

An alternative to this method would be to use the more recently released &Grid command which we shall cover at a later date.

  article by Richard Arney


SEG USER FORUM

Unfortunately we have had to suspend this useful service as some users objected to publication

ABOUT PARASOL

Parasol was originally conceived in 2005 to provide expert help for solicitors struggling to get a return on their investment and make the best of their Solcase or Visualfiles installation.

The Parasol Consultancy Group was initially set up by:-

Richard Arney
Affik Choudhury
Andrew Hall
Tim Long
Bryan Tulloch

SAMPLE CODE

*******************************
Choice Builder
by Richard Arney
*******************************

[&Assign TF301=""]
[&Assign TF302=0]
[&Assign TF303=""]

[&ForEach WKSS,WKS04<>"Yes", noincludeall]
   [&If WKS03<>""]
      [&If TF302<13]
         [&Assign TF300=TF300+WKS03 + ":"]
         [&Assign TF302=TF302+1]
      [&Else]
         [&Assign TF303=TF303+WKS03 + ":"]
      [&EndIf]
   [&EndIf]
[&EndFor]

[&If TF302>12]
   [&Assign TF300= "Exit without updating:" + TF300 + "Manual entry:More>>"]
   [&Assign TF303= "<<Back:" + TF303 + "Exit without updating"]

   [&Label MyFirst]
   [&Assign TF301='Select step ' (choose-expr TF300)]

   [&If TF301 = "More>>"]
      [&Assign TF301='More steps' (choose-expr TF303)]
      [&If TF301="<<Back"]
         [&Goto MyFirst]
      [&EndIf]
   [&EndIf]
[&Else]
   [&Assign TF300= "Exit without updating:" + TF300 + "Manual entry"]
   [&Assign TF301='Select step to update' (choose-expr TF300)]
[&EndIf]