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.

Find Next Empty Field

Featured Replies

I am trying to create an activity signup database. Each event will be a record, and there is a repeating field called Attendees. There is a field called Capacity that defines the maximum amount of participants. There is also a global field called Username that, through VBScript, contains their logon username. I want the users to be able to click a button and have the script find the next empty row and insert their username, but not allow them to sign up if the number of repetitions in the Assignees field exceeds Capacity.

Version: v6.x

Platform: Windows 2000

If [Count(Attendees) = num of repetitions in Attendees]

[color:"white"]__Show Message ["You cannot add any more participants"]

[color:"white"]__Halt Script

End If

Go to Field [Attendees]

Loop

[color:"white"]__If [isEmpty(Status(CurrentFieldContents))]

[color:"white"]____If [status(CurrentRepetitionNumber) > Capacity]

[color:"white"]______Show Message ["The maximum number of participants has been assigned."]

[color:"white"]______Halt Script

[color:"white"]____End If

[color:"white"]____Set Field [gUsername]

[color:"white"]__End If

[color:"white"]__Go to Next Field

End Loop

I haven't tested this, but I think it should work. Just make sure you don't Specify a field for the Set Field step and make sure all repetitions of Attendees are consecutive in the Tab order.

  • Author

It works - kind of. Because of the Go to Next Field step and the Loop, it fills every open slot. How can I get it to enter the username only once?

Whoops! I should have added a Halt Script step after Set Field [gUsername].

  • Author

Suppose I want to allow people to un-sign up. How could I have it remove a repetition from Attendees based on gUsername?

Freeze Window

Go to Field [Attendees]

Loop

[color:"white"]__ If [gUsername = Status(CurrentFieldContents)]

[color:"white"]____ Set Field [""]

[color:"white"]____ Exit Record/Request

[color:"white"]____ Halt Script

[color:"white"]__ End If

[color:"white"]__ Go to Next Field

[color:"white"]__ Exit Loop If [status(CurrentFieldName) <> "Attendees"]

End Loop

Exit Record/Request

As long as there is more than just the Attendees field on the layout, this won't loop infinitely.

A note about the first script: to make it nicer for your users I would add a Freeze Window step to the beginning and Exit Record/Request steps just before the Halt Script steps.

Version: v5.x

Platform: Windows 2000

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.