March 26, 200124 yr I am still woring on the jury pool script and I thank everyone who has helped. The number of potential jurors will vary from trial to trial. Is there a way to define a variable that represents the maximum number of jurors? Right now the closest is: Exit Loop If ["TotalSelected = 100"] where 100 is the maximum number of jurors.
March 27, 200124 yr One way to do this is with a Global: The data would need to be available on each record. GJurorsSelected [number]- increment this number in your script each time a juror is selected. [setField(GJurorSelected,(GJurorSelected +1)] At the start of the loop, check to see if GJurorsSelected is >= 100: If(GJurorSelected >= 100 Exit Script I think you'll get the idea.
March 27, 200124 yr Author quote: Originally posted by dykstrl: One way to do this is with a Global: The data would need to be available on each record. GJurorsSelected [number]- increment this number in your script each time a juror is selected. [setField(GJurorSelected,(GJurorSelected +1)] At the start of the loop, check to see if GJurorsSelected is >= 100: If(GJurorSelected >= 100 Exit Script I think you'll get the idea. Is there a way to let the user decide how big the juror pool will be. Sometimes the Clerk of Court will need a bigger or smaller pool and she needs to be able to decide the number (100, 200, 50, etc.). Is there a way for the user to select the number by putting her choice in a variable? Maybe the easiest way would be to write at least 3 scripts (small, medium, & large) and use 50, 100, 200.
March 28, 200124 yr Simply replace the "100" with another global field with type as number. The user could then enter however many they want. Change this line >If(GJurorSelected >= 100< to read: If(GJurorSelected >= gJurorsNeeded
March 29, 200124 yr Author Thanks! I believe this will work. Is there an equivalent to the old EOF (end of file) command. I need this to stop the loop as well as the If(GJurorSelected >=100. The juror list is continually updated so the total number of records is always changing. quote: Originally posted by dykstrl: Simply replace the "100" with another global field with type as number. The user could then enter however many they want. Change this line >If(GJurorSelected >= 100< to read: If(GJurorSelected >= gJurorsNeeded
March 29, 200124 yr Select the "Exit after last" option in the "Go to Record/Request [next]" step. Or you can add an "Exit Loop If (status(currentrecordnumber)=status(currentfoundcount))" step somewhere in the loop.
March 30, 200124 yr Author Thanks! This will work fine. I very much appreciate the help. quote: Originally posted by BobWeaver: Select the "Exit after last" option in the "Go to Record/Request [next]" step. Or you can add an "Exit Loop If (status(currentrecordnumber)=status(currentfoundcount))" step somewhere in the loop.
April 2, 200124 yr quote: Originally posted by salberg: Is there a way to let the user decide how big the juror pool will be. Sometimes the Clerk of Court will need a bigger or smaller pool and she needs to be able to decide the number (100, 200, 50, etc.). Is there a way for the user to select the number by putting her choice in a variable? Maybe the easiest way would be to write at least 3 scripts (small, medium, & large) and use 50, 100, 200. I have needed to provide a similar user-set cutoff, and used a Showmessage to offer the user 3 options, which I then use to set a global variable: ShowMessage Buttons "Value1","Value2","Value3" If StatusCurrentMessageChoice = 1 SetField GField = Value1 If StatusCurrentMessageChoice = 2 SetField GField = Value2 If StatusCurrentMessageChoice = 3 SetField GField = Value3 etc...
Create an account or sign in to comment