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

Formula for Edit access to records??


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

Recommended Posts

Posted

I hope this is the correct place for this question.

I have been using FMP for some time now but I am a super newbie at formula/calculations and such.

I finally convinced my school to do course selections for next year using FMP instead by hand using paper & pencil. And in doing so have ran into things I don't know quite how to accomplish. So any help will be greatly appreciated.

Currently I have students typing in their ID number which will then bring up their record and the course selection layout. However I don't want them to be able to go back in once they have made their selections and edit it.

I saw under the passwords you can limit the edit ability using a formula but I have no idea how to go about this. I have already limited the access to the fields and layouts using the password/access screens. But this will not stop students from getting back in and changing things. Perhaps I am approaching this in the wrong place.

I have 3 databases set up Course Selection, Demographics, Test Results.

I have them related through student_id.

Any ideas, help and suggestions would be terrific. Let me know if more information is needed.

Version: v6.x

Platform: Mac OS 9

Posted

Cmack:

The question is, do you want them to be able to view everything again? Or, where do you want them to end up if they've already entered their selections, and they enter their id number again?

What you can do is to set a field (let's call it "Status") to "Done" when the student finishes entering their course selections. Or, you could pick a field (or multiple fields) that they enter during the selection process. In the script that processes their student ID number, check that "Status"="Done" or that the other fields you'll use are full or empty. If you are verifying that they have already entered the data, send them to a layout where they cannot alter the data (or kick them back to the login page if you'd rather)... otherwise, send them to the course selection page as per normal...

-Stanley

Posted

Stanley,

Thanks for replying. Ok I definately don't want them going back in and changing things once they are done. I can add a field called Status (that's a good name for it).I currently have a button that they must press when finished that brings them back to the login page. Would I attach the script that sets the field "Status" to "Done" to that button?

Posted

I have been trying to create the script mentioned by Stanley but I am a little lost. I am very new to creating scripts and I am not sure how to tell it to check and if a record is done or not.

Any further help would be wonderful.

Thank you,

Cmack

Posted

Cmack:

Yes, attach the script to the button. Right now you've probably got the button to just switch layouts, right?

You'd write a script with the following in it:

Set Field[status,"Done"]

Go To Layout[Your_Startup_Layout]

Then, when they go to check in again (entering their ID number) you've got to have another script to parse the Status field. So, if in the login page you've got a button that is "Start" or whatever, you'd actually be running a script that does the following:

Go To Layout[Wherever_They_Enter_Their_ID]

Enter Find Mode[]

Go To Field[student_ID]

Pause/Resume Script

Perform Find[]

If[status="Done"]

Go To Layout[Your_Startup_Layout]

Exit Script

Else

Go To Layout[Where_They_Enter_Info]

End If

Or something like that, anyway. You could also put in error correction to check that they have entered a valid ID number, etc.

-Stanley

Posted

OK I am a little slow.

I understand what you say to do and it makes sense (yeah). I am having trouble getting the

SetField[status,"Done"]

I have a field call Status when I go into the the scriptmaker I see SetField so I add that to the right side. I then have two choice at the bottom. Specify Field and Specify...

IF I select Specify Field I can get it to Say

SetField["Status"] this does not seem to do anything and it does not look like yours so I did not expect it too

If I choose Specify..

It brings up the calculation dialog appears and I tried selecting the

Status(status flag) I put in the word Done Status("done") and I get this

Set Field["Status,("Done")"] this also does not look like your example and does not seem to work.

Is there a different formula that I should be using? Sorry to be so thick about this..I appreciate your help and patience.

Cmack

Posted

You are doing the "Specify Field" part correctly.

Now choose "Specify" and type in "Done"

(with the quotes)

This is simply setting the status field to say "Done".

Voila!

cheers,

Wendy

Posted

Wendy,

Thank you for that info. It was too simple. I was making it way more complicated that it was. That part is working now!! :-)

Now I seem to be stuck on getting the script to check if that field is indeed set to done. This is what I have and it does not seem to work.

This is what I have for when they first enter the program:

Go to Layout [ Entrance ]

Enter Find Mode [ Pause ]

Go to Field [ Student Number ]

Perform find

If [ Status = "done" ]

Go to Layout [ Entrance ]

Else

Go to Layout [ Selection Form ]

End If

This is the script when they use the button that says "Click here when done":

Set Field [ Status, "done" ]

Go to Layout [ Entrance ]

Enter Find Mode [ Pause ]

Go to Field [ Student Number ]

Perform find

If [ Status("done") ] ------------->see below

Go to Layout [ Entrance ]

Else

Go to Layout [ Selection Form ]

End If

Notice this is different then the first script. I tried two different ways but I am still doing something wrong.

Thanks for all the help so far.

Cmack

Posted

What is the purpose of the Go to Field [ Student Number ] step? It's running after the Pause, so in essence, it's doing nothing valuable since it won't be activated until after the user clicks Continue or presses Enter.

If[ Status("done") ] has no meaning. If [ Status = "done" ] is correct.

When a user clicks the "Click here when done" button, what is it supposed to do? Right now it's setting the Status to "done" and then letting them enter criteria to do a new search. You don't have a check for no criteria or no found records. What should happen in such situations?

Posted

Well I see what you mean about the Go to Field [ Student Number ] that is supposed to be before the find.

Here is what I am trying to accomplish. Hopefully it makes sense.

DB opens to a screen in Find Mode where student enters their Student ID number and hits Return to take them to the layout Selection Form.

On the Selection Form layout the are to pick the classes they want next year then they click the button "Click here when Done"

I want it (the button) to take them back to the original screen for the next student to be able to type in his/her number and continue to the Selction screen. This process being repeated for each student.

However, I need to make sure they can't go back in and change it once they have made their selections. We will be printing them out for a parent signature and I need to make sure the printed copy is what is in our database. So I need to keep the students from being able to get back in change things.

I also noticed that if it does see that the status is 'done' it exits the script but I need it to actually go back into find mode and continue on to the selection form when a student does put in a valid number.

I hope this makes sense. Thanks all.

CMack

Posted

The scripts listed above are the ones I am trying to get to work. Obviously they don't or I would not be begging for hlep smile.gif

The script does set the status field to done correctly but I can't get it to check that status field so that it does not allow the user to go back in and modify their record.

Thanks,

CMack

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