Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7561 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi

I am working for a company that has a weekly auction. There are 120 possible selling slots at this auction , so in the registration process we have those slots empty in the begining of the week. As the week progresses , we assign items to each slot. They are like 'A1" . "A2" . "A3" and are each different fields ( not repetitions) Is there a way with some kind of script to probe and find the next available EMPTY slot and go there?

In other words a1, a2, a3 are full of information but field a4 is the first available slot to go to . Can a script be written to somehow find the first empty field?

Thanks for your info

STAN

Version: v6.x

Platform: Mac OS X Panther

Posted

Stan->

You can use a loop (simplified):

Go to Record... [First]

Loop

If - put you test for empty slot here & do an Exit Loop If [true] to get out of the loop

End If

Go to Record... [Next, Exit if Last]

End Loop

You could use a relationship if you empty slots are marked and are not empty fields:

1) create a global of the same kind as the match field, fill it with the "Empty" value

2) create the relationship between the global and the match field

3) any Relationship::slotID will refer to the first empty slot.

Does this answer the question & make sense?

Posted

It is still a little difficult for me to understand

I think I can write a manual script to go to a named field and if it is empty go to that field and if it is with a valid entry go to the next field. I am enclosing a pdf of a screen shot of what I have. You can notice that field a62 is the first empty field.

Stan

Version: v6.x

Platform: Mac OS X Panther

Picture 6.pdf

Posted

Create a global gnum1 of type number. Make sure the fields you want to test are in consecutive tab order starting with the first field on the layout (Click out of the record, then press Tab to see which field is first. Go into Layout mode, select Layouts->Set Tab Order to modify it if necessary.) In your script,

Freeze Window

Set Field [gnum1, # of fields]

Exit Record/Request

Loop

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

[color:"white"]__ Exit Loop If [isEmpty( GetField( Status(CurrentFieldName) ) )]

[color:"white"]__ Set Field [gnum1, gnum1 - 1]

[color:"white"]__ If [not gnum1]

[color:"white"]____ Show Message ["All slots are taken."]

[color:"white"]____ Halt Script

[color:"white"]__ End If

End Loop

Version: v5.x

Platform: Windows 2000

Posted

WOW THAT REALLY HELPED ME

T H A N K S

Is it possible to report to me the NAME of that field that is the first one empty so I can place in another layout by any chance?

STan

Posted

Status(CurrentFieldName) will give you the name of the field currently containing the cursor. But you will need one layout per field, if you want to isolate the resulting field, which may or may not be acceptable. If you only want to move to another layout that does contain all the tested fields, then set a global text field with Status(CurrentFieldName), go to the desired layout, Exit Record/Request, run a Go to Next Field loop, Exiting Loop If [status(CurrentFieldName) = gtext].

This topic is 7561 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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