7 Replies Latest reply on Aug 11, 2015 9:50 PM by philmodjunk

    Portal Field Help



      Portal Field Help


      FMPro 14

      I have a Portal field on a "Master " form that displays employee names and attendance (absent / present) next to each name as a pull down)  I would like to know how I can "filter" the view of the Portal fields to only show:



      A:  Absent ONLY

      B:  Present ONLY 

      C: All Employees      Then have scripts linked to buttons outside of the Portal allowing me to print a list of each condition.     Any ideas or suggestions welcomed....



        • 1. Re: Portal Field Help

          I wouldn't use a portal for printing this data as you might have records in your portal that are not visible without scrolling and you would be unable to print those. A list view based on the portal's table can be used to print the same information while avoiding this limitation. Instead of filtering the portal, you'd perform a find (manually or with a script) to find and list the records you want to print.

          But to filter a portal, you could produce this portal filter expression.

          LayoutTable::FilterField = "All" Or PortalTable::Attendance = LayoutTable::FilterField

          Your button scripts might then be written like this:

          Set Field [LayoutTable::FilterField ; Get ( ScriptParameter ) ]
          Refresh Portal ["Portal Object Name Here"]

          You'd use the Inspector's Name box to give the portal an object name to use in this script. Your three buttons would all perform the same script, but each would pass a different value, "All", "Absent" , "Present" to it in order to filter for a different value.

          • 2. Re: Portal Field Help

            Thanks for getting back to me! I understand the "intent" here just not how to implement it 

            My Portal name is "Employees"    the field  that would decide the filter is "Status"  (All, Absent, Present).

            Where is the script "entered?"  I am new with this level so I could use a little guidance....


            • 3. Re: Portal Field Help

              If you are using FileMaker 14, you would open the scripts workspace and create this script. If you are using an older version, you would open manage Scripts and use it to create the script.

              In any recent version, you would then use the button tool in the header to add a button to your layout. The button set up dialog will then appear and you can set it to perform a script. A button in this dialog will open yet another dialog where you can select the script to be run when the button is clicked.

              • 4. Re: Portal Field Help

                I'm really confused now....  from where do I open a script window? inside the Portal, from the Main Screen, I have failed at both attempts.

                Here is a picture - maybe this will explain better what I am trying to accomplish...

                • 5. Re: Portal Field Help

                  Pull down the scripts menu and select "scripts workspace".

                  • 6. Re: Portal Field Help


                    I have followed your instructions to the letter with no success. In fact, I was unable to save the script as typed. Something just isn't clicking here. I have successfully written numerous scripts....these however just don't work. what I am I missing here????

                    I really need these to work....any other suggestions?


                    • 7. Re: Portal Field Help

                      I suggest that you learn how to get the scripts workspace to work for you. And you can describe how this has failed for you if you'd like help in getting it to work.

                      This method does work, I've used it myself.