Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Creating a variable in a script

Featured Replies

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.

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.

  • 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.

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

  • 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

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.

  • 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.

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

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.