lpm Posted June 14, 2007 Posted June 14, 2007 FMP8 Adv, WinXP The Background: Layout 1 in Table A (Students) shows a student record along with a portal which lists the assignments selected for that student. Layout 2 in Table B (Assignments) shows the same student record and a portal listing the complete list of more than 1000 available assignments for the course. As assignments are selected from the portal in Table B for that student, they show up in the portal in Table A for that student with a checkbox in each portal row to be checked when the assignment is completed. The Task: I’d like to create a popup window that shows the assignments for that student (checked and unchecked) from the portal on Layout 1. This popup window should not allow entry into any fields – it is for viewing only -- and will allow user to see which assignments have already been selected. The popup window is positioned to the side for reference while new assignments are selected from the portal on Layout 2. The problem: The window I’ve created displays the fields and portal info from Layout 1 all right but not for the same student. Apparently the info showing in the popup window is from the first student record in Table A. I’m not sure how to fix this so that the data in the popup window (from Layout 1) is for the same student whose record is current on Layout 2. I hope you can help, TIA lpm
Vaughan Posted June 14, 2007 Posted June 14, 2007 You're going to have to post the steps in the script you use to create the window. There is a problem with it: somewhere it's losing the focus of the portal row that was clicked on. The button that runs this script has to be in the student's portal row for it to work properly. If it's not in the portal then FMP has no way of know which related record is selected.
lpm Posted June 14, 2007 Author Posted June 14, 2007 That's just it...I'm not opening the window by clicking on a portal row in Layout 1 in Table A. The window opening process actually begins on Layout 2 of Table B where there is a button to open the window that shows a view-only layout (copy of Layout 1). Layout 2 is a student record with a portal showing 1000+ assignments from which to select for the student. The window is positioned aside for reference only while the user selects more assignments from a portal in Layout 2 of Table B. I'm not sure if/how I use GTRR without initiating it from a portal row click. I don't need to click in a portal except to select an assignment in Layout 2 and that action shouldn't trigger a window. Currently, my script looks like this and it does everything I need except match the student in Layout 2 with the student in the window (a view-only copy of layout 1). Instead, the window shows the student info and portal of the first student record in Table A. -Go to Related Record [show only related records; From table: "OpenWindow_TO"; Using layout "Layout 1 Copy" (Table A)] -New Window [Name:"ViewOnlyWindow"] -Go to Layout ["Layout 1 Copy" (Table A)] -Show/Hide Status Area [Hide] -Adjust Window [Resize to Fit] -Move/Resize Window ]Durrent Window: Height: 310; Width: 715; Top: (Get(WindowTop) + 35; Left:Get(WindowLeft) + 45
Vaughan Posted June 14, 2007 Posted June 14, 2007 One way would be to store the student record-id in a variable, then in the student's window loop through the records until you're on the right student. Note that this could take a few seconds when the record count gets large (10,000 of records).
Recommended Posts
This topic is 6372 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 accountSign in
Already have an account? Sign in here.
Sign In Now