2 Replies Latest reply on Aug 26, 2009 12:27 PM by mmccarty

    Using GetLayoutObjectAttribute in a portal

    mmccarty

      Title

      Using GetLayoutObjectAttribute in a portal

      Post

      Hello,

        On one of my layouts, my users modify the records in a portal.  My users access the database from the web (IWP) and I have removed their toolbar.  I need to give then a "Done" button that performs the script step Commit Record/Request.  I want to set up conditional formatting so that the button is visible only when the user is editing a field aka when the field is active. 

       I'm trying to use GetLayoutObjectAttribute to create the conditional formatting but it is not behaving like I thought.  When I use it to see if the portal field is active [GetLayoutObjectAttribute("portal field";"hasFocus")=1] the formatting only applies if the button and the field overlay.  This causes a problem because it creates a button for each portal row and in IWP you can't click buttons that overlay another object.  I tried using the portal as the object, using "containFocus" instead of "hasFocus" and using the optional portalRowNumber parameter but can't get it to work.

       

      I must be doing something wrong or I miss understand how this function works.  If anyone know where I'm going wrong or a better function to use I would really appreciate it.  Thanks!

        • 1. Re: Using GetLayoutObjectAttribute in a portal
          TSGal

          mmccarty:

           

          Thank you for your post.

           

          On your layout, you may want to make every field a button.  When you click on the button, it switches to an identical layout, but each field is accessible AND the "Done" button is available.  When the "Done" button is clicked, have a script execute that commits the record and switches back to the other layout.

           

          The conditional formatting will work on a field after the data is committed.  In FileMaker Pro, this is immediate, whereas with Instant Web Publishing, you must wait until you commit/submit the record.

           

          This should give you a good starting point.

           

          TSGal

          FileMaker, Inc. 

          • 2. Re: Using GetLayoutObjectAttribute in a portal
            mmccarty
               Thanks!! It works great!