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

not getting to the first empty field in a record

Featured Replies

Hello

I have a script below that

finds the first place that 2 fields in a record are empty.

I have my files in list mode and they show up as a kind of report. The Problem I cannot figure out is how to get the cursor to go to the 1st record when it is empty, I always have 200 records to start. The present script below gets the cursor to the right place (the first empty record ) but that is not the case when there are filled in records beyond record 1 and a second empty record was for instance, record 16 , the cursor goes to record sixteen but not where it should to record one. (Because record one is emtpy. )

This is used for an auction and the 200 records serve as a constant of the number of places that may be reserved.

So my problem is correcting the script below to make the cursor go to record one to field "controlA" when it is empty. If record 1 and record 12 have the empty field " LANE A::combinedtofind" it goes to record 12 instead of 1. I need help to solve this.

Thanks very much.

Go to Layout [ "Lane "A"" (LANE A) ]

Set Field [ LANE A::gnumA; 200 ]

Freeze Window

Go to Record/Request/Page

[ First ]

If [ IsEmpty ( LANE A::combinedtofind ) ]

Go to Record/Request/Page

[ First ]

Go to Field [ LANE A::controlA ]

Commit Records/Requests

[ No dialog ]

End If

Loop

Go to Record/Request/Page

[ Next; Exit after last ]

Go to Field [ LANE A::combinedtofind ]

Exit Loop If [ IsEmpty(LANE A::combinedtofind) ]

Set Field [ LANE A::gnumA; LANE A::gnumA ]

If [ not LANE A::gnumA ]

Show Custom Dialog [ Message: "The Are NO Available slots in this A lane!"; Buttons: "OK", "Cancel" ]

Halt Script

End If

End Loop

Go to Field [ LANE A::controlA ]

Pause/Resume Script [ Indefinitely ]

Go to Layout [ "REGISTRATION" (REGISTRATION) ]

Hi Stann,

I'm not any expert with scripts, so maybe others will give you a better one, or something that is better suited for version 7.

However, this one will take you to the first open dealer field.

Go to Layout [

Are you saying if the field is empty in record 12, you want it to go back to record 1? Well, you have two steps that go to the first record up at the top of the script -- the second one is not really doing anything, maybe you meant to put it inside the loop.

Fitch said:

Are you saying if the field is empty in record 12, you want it to go back to record 1?

Yes, in the process of entering data, records are skipped, so in a sense they would need to look from the start to find the next blank record. Record 1 could be empty.

Fitch also said:

Well, you have two steps that go to the first record up at the top of the script -- the second one is not really doing anything, maybe you meant to put it inside the loop.

How about an example of how this should be written to accomplish the goal stated.

As I stated, I'm not an expert with scripts,

Lee

laugh.gif

Lee, I tend to use the Quick Reply box, so although it appears I was responding to your post, I was actually attempting to respond to the original post. Look at the script in that post and you'll see what I mean.

Hi Tom,

Me too. You sure had me going there though smile.gifgrin.gifcrazy.gif

Lee

cool.gif

Create an account or sign in to comment

Important Information

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

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.