4 Replies Latest reply on Oct 2, 2010 1:26 PM by wjbombo

    Work around no conditional formating in IWP



      Work around no conditional formating in IWP



        I am working on FM Pro 10 and want to have a "next" button only when there actually is a next record.  This would be pretty simple with conditional formatting but my DB is deployed via IWP.  Conditional formatting isn't available in IWP.  I was thinking about the Insert Object script step but that requires a container field and I'm fairly sure you can't modify container field data in IWP. 

      Does anyone have an ideas for possible workarounds?  I'd prefer the "next" button to disappear and not become grayed out when not needed.

      Thanks in advanced!

        • 1. Re: Work around no conditional formating in IWP


          Thank you for posting.

          One straightforward solution is to create a new layout without the next button. When the user runs the Next Record script, they can be directed to the duplicate layout if the current record is the second to last. For example:

          If [Get(RecordNumber) = (Get(FoundCount) - 1)]
            Go to Layout ["Browse End"]
          End If
          Go to Record/Request/Page [Next]

          You may need to consider how to go back to the original Browse layout and other issues, but this should get you started on one possible method.

          FileMaker, Inc.

          • 2. Re: Work around no conditional formating in IWP

            TSuki, you are suggesting that I create a duplicate layout called "Browse End" that doesn't contain the "next button" and send my users to that whenever FoundCount=1.  I use this technique a lot in my database and the list of layouts is getting pretty long.  Is there any way to add the button to a screen as part of a script?

            • 3. Re: Work around no conditional formating in IWP

              You can't add buttons, but you can use visibility tricks to hide/reveal the button. Frankly, the extra layout seems like an easier approach to use, but since you asked:

              You can define a small single row portal with invisible borders and place the button inside the portal. To hide the button, change the value of the field used to relate the current record to the portal record so that the values no longer match and the button will disappear.

              Haven't tried that in IWP, but it's worth a try.

              • 4. Re: Work around no conditional formating in IWP

                Another approach is to create three fields:

                 1. a calculated container field for the button graphic

                 2. a container field with a 1 x 1 pixel of the color of your choice entered to refer to if you want the color to display in field 1.  (Make all subsequent records copy from the first to keep all populated as if a global field)

                 3. a calculated text field for the button text

                Overlap the two and calculate the fields based on the conditions you desire.  When they're both "empty" as in "".  They will come back blank and should not display on IWP.  If you want the button to display, have it show the text you desire and reference the container field (2).  Then script the button to halt if accidentally clicked on by the user in IWP or perform the desired action.

                Note: be sure to assign BOTH displaying fields (1&3) the script.

                Not elegant I know, but IWP isn't known for it's robust capabilities without a lot of work-arounds. :)