MHAriete64 Posted December 18, 2006 Posted December 18, 2006 (edited) 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. //ichael -- Script: 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 December 18, 2006 by Guest
LaRetta Posted December 18, 2006 Posted December 18, 2006 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 LaRetta
MHAriete64 Posted December 18, 2006 Author Posted December 18, 2006 Bless you LaRetta! : Worked splendidly!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now