Jump to content

A seemingly simple Set Fields command isn't working

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

Recommended Posts

I've got a script that should do some very simple record creation work.

I have a Students Table and a Programs Table. In the Students Table I have a portal that shows the Programs Table information related to the record in the Students Table.

I've created this script to, once you're looking at a student record, add a record related to this student in the Programs Table (therefore having it show up in the portal).

My script creates a new record and somehow misses the step of Set Field piece and goes right on to the next field.

Can anyone offer a little insight?

Thanks so much.




New Window [Name:"Enter New Program"]

Go to Layout ["Programs"(Programs)]

Enter Browse Mode []

New Record/Request

Set Field [Programs::Student ID; Students::Student ID]

Go to Field [select/perform; Programs::Current Program]

Pause/Resume Script [Duration 9seconds0: 120]

Close Window [Current Window]

Go to Layout [original layout]

Edited by Guest
Link to comment
Share on other sites

How are you picking up the StudentID? When you go to another layout based upon a different table occurrence, FM won't know which Student is related so you need to take along that information. Add this to the beginning of your script:

Set Variable [ $StudentID ; Students::StudentID ]

Then change your Set Field[] to:

Set Field [ Programs::StudentID ; $StudentID ]

... and add this line after you've set the fields:

Commit Records/Requests


Link to comment
Share on other sites

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