Jump to content
Server Maintenance This Week. ×

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

Recommended Posts

I need help creating a start-up script for IWP.

 

I have a High School registration program we are putting on the web this year using IWP. There are three tables based on the student’s grade level (grade12, grade11, and grade10). All the fields work on the tables, but I need to get the students to the correct table based on their grade level. Every student has a unique code built into his/her individual record.

 

Example of a code:  Grade 12 student:  M2478W  

Grade 11 student:  A2009K

 

Here is what I need the script to do:

When a student logs into the program on the web with user name and password I want the student to be taken to the layout “Find my Registration” and into a field “Reg Code” waiting for the student to enter his/her unique code into the field. The student would then click continue. Based on the “Reg Code” the script would look in the student table, find the student, check the grade level and the go to the correct table based on the grade level find.

 

I hope this can be done.

 

Thanks for any help.

 

Using Filemaker Server 11

Link to comment
Share on other sites

Reg Code will need to be a global field.  The script will be something like:

 

Freeze Window

Enter Find Mode

Set Field[students::code; Students::Reg Code]

Perform Find

# add error checking here in case student mistypes code

# or tries to access a code that is not his

If[students::grade = 12]

Go to Layout["Grade12Layout"]

Else if [students::grade = 11]

Go to Layout["Grade11Layout"]

Else if [students::grade = 10]

Go to Layout["Grade10Layout"]

#  etc

End If

 

Rather than a separate "Find my Registration"  layout, I think I would use a custom dialog.

Link to comment
Share on other sites

Hi Lesterd

 

If you are using IWP, you'll find a number of script steps that may work in the Filemaker client don't work in IWP - so you can't use a custom dialog for example.

 

Firstly, I assume that the students login will have it's own privilege set so that you can identify that you have a student logging in.  You can make this check part of your start-up script, so you can test for the privilege set and steer the student to the 'Find my registration' layout, whilst other logins may go elsewhere.

 

On the 'Find my registration' layout you'll need a global field, into which the student can enter his grade code.  Make sure that the status area is hidden and locked, so the student doesn't see any of the IWP editing controls. Have two buttons on the layout -  a button named (for example) Find which gets the student into the system and also a logout button, which just runs 'quit application' to get him out of the system.

 

The find button should have a script that runs a find with error trapping in it - you uses the information that the student has entered into the global field to search for this code in the student table, If the find fails, you return him to the find screen for another go.

 

if the find is successful, then you know which student you have and can then steer him to the layout and record you want. 

If the student is allowed to enter information, don't give them access to the IWP controls. Instead set up a separate data entry layout which uses global fields for the items he is allowed to change.  The student presses an 'edit' button which loads the data from the current record into the global fields then displays the data entry layout.  The student makes the changes he wants and presses a 'save' button. This can then run sanity checks on what has been entered and then write the contents of the globals back into the record.  (If anyone else is likely to be editing the same record, you may need to add an 'in use' flag and some additional code to manage it.)

 

I'd suggest you have separate IWP layouts which are designed for use with browsers - these tend to have a lot of the top part of the screen occupied with controls and address bars - and to keep the layouts as compact as possible.  Don't forget most of your students will probably be trying to access your IWP system from their phone or tablet rather than a desktop or laptop computer.

 

HTH

 

Brian

Link to comment
Share on other sites

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