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

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

Recommended Posts

  • Newbies
Posted

Hello,

I'm new to FM7 and scripting. I'm urgently need to come up with a event registration database where an attendee would enter their cellphone number for validation. If the attendee is pre-registered, it would display a thank you message and if not, it would proceed to a registration form . Can i create a script to perform this task?

Incidentally i'm using the built-in FM7 registration template.

Someone from another forum posted this up >.. how do i convert this to FM7

When a Registrant arrives, you should be on a screen which has two buttons (One labeled "Register" and the other "Pre-Registered"). Clicking the first moves one to the registration form and waits for data entry. Clicking the second moves to a screen which would require the entry of their reg. number and last name into two global fields (g_RegNo. & g_LastName) and then clicking "continue".

The Continue button would have a script (called "Pre-Registered" similar to this:

Got to Welcome Screen

Freeze Window

SetField (g_RegNo.,"")

SetField (g_LastName,"")

User Abort Off

Error Correction On

Enter Find Mode (No Restore, No Pause)

SetField (Registration Number,g_RegNo.)

SetField (Last Name,g_LastName)

Perform Find (No Restore)

If( Status(CurrentFoundCount)= 1

Go to Layout (Desired Layout)

Perform Script (Whatever you wish done for pre-registerees)

Else

If( Status(CurrentFoundCount)= 0

Show All Records

Beep

Show Message ("No such registration was found, click OK to try again")(One Button "OK")

Perform Script (Pre-Registered) - which creates a sort of loop if no match is found)

Else

If( Status(CurrentFoundCount)>= 2

Beep

Show Message ("Duplicate Registrations were found, click OK to now continue")(one Button "OK")

Go to Layout (List View)

Sort (pre-defined)

Exit Script

EndIf

EndIf

EndIf

Posted

Wecki:

Welcome to the forums. Your script looks pretty good, except that you're resetting your globals to "" at the beginning rather than after your Find, which means you'll end up searching for nothing.

To update this to FMP7, you'll have to change your Status calls to Get calls (i.e., Status(CurrentFoundCount) becomes Get(FoundCount), etc.). Also, I'd do a bit more when you've found more than one item. Theoretically this is your key field and should be unique...

-Stanley

This topic is 7414 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.