12 Replies Latest reply on Aug 25, 2016 3:31 AM by okramis

    Go to Portal Row in IWP


      FileMaker Pro Advanced 10.3 with FileMaker Server 11.5


      Documentation says that Go to Portal Row works with IWP in my situation but when I return from a related record I am always in the first record of the portal rather than the related record I selected.


      My script contains the following:

      Set Variable [$mypr; Value: Get (PortalRowNumber)]

      Go to Related Record [From table: "Student Schedules"; Using Layout: "Student Schedules" (Student Schedules"]

      \\ Then I have an IF statement that does some things.

      \\ After those things are done, I return to the layout with the portal.

      Go to Layout ["Require Students" (Teacher's 7th Hour Attendance 2)]

      Go to Portal Row [Select; No dialog; $mypr]


      This all works great when I run it on my personal computer (I get back to the portal row where I selected the related record), but when I run it through the server I always end up in the first record.  I realize that I am using older software, but it works great for everything that I need it to do except for the Go to Portal Row...hopefully someone has a working solution.

        • 1. Re: Go to Portal Row in IWP

          Might not make any difference, but can you try naming the Portal, then 'Go to Object' just before the 'Go to Portal Row'?

          • 2. Re: Go to Portal Row in IWP

            Thanks for the suggestion, I'll give it a try tomorrow.

            • 3. Re: Go to Portal Row in IWP

              For this purpose, I have a textfield in my portal table mytable::_row placed in the portal 1 pixel hight and width. Then to return to the row:

              Go to Field [PortalTO::_row]

              Go to Portal Row [$mypr]

              • 4. Re: Go to Portal Row in IWP

                That is the alternative to naming the portal as the Object - you can use the 'Go to Field' and name any field in the portal (no need to create one specially).  I don't like that idea as much as naming the portal itself because sometimes a layout can have two portals with the same relationship, and the script goes to the right field in the wrong portal.

                Just my observation.

                • 5. Re: Go to Portal Row in IWP


                  The last three lines have been tried without the Go to Object and/or the Go to Field.  The field that I am trying to go to is in the portal that contains related records from a table Student Schedules. The portal is in a Layout based on a different table Teacher's 7th Hour Attendance.

                  • 6. Re: Go to Portal Row in IWP

                    I posted the entire script...I'm wondering if there is some setting that I am missing because I cannot get this thing to work.  In your post Go to Field [PortalTO::_row], is PortalTO the related table with _row a field in that table OR is PortalTO the layout/table that is host to the portal?


                    PS: I am pretty much a novice when it comes to this stuff but I did put together a pretty good database to solve an attendance issue for my school.  Now I'm just trying to put on the finishing touches to make it work even better...like not having to start over (record 1 out of 1000) when selecting a student to attend my 7th Hour.


                    Thanks in advance for any guidance you can provide.

                    • 7. Re: Go to Portal Row in IWP

                      How do you trigger the script? In my findings, in IWP $mypr does not get filled properly, if there's no active field in the row when setting the variable. So I have a button on the portal, click on it does:


                      go to Field [PortalTO::_row] //thats my tiny/invisible dummy field

                      Set Variable [$mypr; Value:Get ( PortalRowNumber )]




                      has to

                      be done


                      go to Field [PortalTO::_row]

                      Go to Portal Row [$mypr]


                      P.S. PortalTO is the TO the portal is based on

                      1 of 1 people found this helpful
                      • 8. Re: Go to Portal Row in IWP

                        Thanks, this got it.  Putting that Go to Field before setting the variable made it all work perfectly.


                        I hid my "dummy" field behind another field that I gave a white background.  The other thing that it took was setting the "dummy" field to be modifiable in the Privilege Set.


                        Thanks to both of you for your help.

                        • 9. Re: Go to Portal Row in IWP

                          It's great that you've got the script working, but I'm not convinced of the reasons why.  (Just the pedant in me.)  I can't see why 'Go to field' directed to a 'dummy' field is any different than going to an other field (that is in the portal) or going to a named portal object.  And you shouldn't have to allow data entry to the field in the Privilege settings, as a script will allow the user to interact with an otherwise banned field - they just can't click in the field to make it active.  That is the case in FM Pro; maybe it's different in IWP.

                          • 10. Re: Go to Portal Row in IWP

                            As written in the OP, FileMaker client does not need the Go to Field, it's needed for IWP. And yes, IWP needs the field to be editable. Thats why I use a tiny dummy field, that appears invisible for the user. If the portal has more then 1 instance on the layout, I use multiple dummy-fields to address the right portal.

                            • 11. Re: Go to Portal Row in IWP

                              Every day's a school day for me.  Do you know if the same is required with WebDirect?

                              • 12. Re: Go to Portal Row in IWP

                                Can't say for WD, but I assume it's closer to the FMPro functionality, would need some Tests