7 Replies Latest reply on Mar 13, 2012 2:48 PM by ChrisBishop

    Find Mode in IWP



      Find Mode in IWP


      Hello All,
















        • 1. Re: Find Mode in IWP

          This is an easy fix, I ran into the same problem awhile ago.


          It is best to have a specific layout for searching that is only used by IWP users (it can be identical, but just have one extra button on it).


          You can set this up using

          If Get(applicationversion)="Filemaker Web Publishing" 

              Go to layout ["find IWP"]

              Enter find mode 


               go to layout ["find normal"]

               enter find mode 

          end if


          Then on the find IWP layout, have a button they push to perform the find.  The button is scripted to

          Perform Find []

          #then whatever you want it to do with the find.


          Hope this helps.




          • 2. Re: Find Mode in IWP

            Sorry, that if statement should read


            If [LeftWords (Get(applicationversion);3)="Filemaker Web Publishing"]


            Since it will return a version etc after those 3 words.  The Leftwords command will only read the "Filemaker Web Publishing"  parts and forget about the version number.



            • 3. Re: Find Mode in IWP

              Thanks for the post Craig!  (I give that a try)


              Another question??


              In layout IWP is there a way the user can just hit enter and do the search?


              Example: I have a field call P.O number and the user want to find a specific # like p.o 111.


              When the user type 111 in P.O field and press enter user should see all the results. 



              I know this works in filemaker pro but not in iwp.

              • 4. Re: Find Mode in IWP

                Not that I know of... however, someone else on this forum may have an answer.



                • 5. Re: Find Mode in IWP



                  Thank you for your post.


                  Yes, in FileMaker Pro, you can press return to initiate the Find.  With Instant Web Publishing, you are access the data through the browser.  There is no default button in Instant Web Publishing to accept a return.  Therefore, when you enter 111 followed by a return, the return is placed in the field you are editing.


                  I would encourage you to enter this as a suggestion into our Feature Suggestion web form at:




                  Although I could copy your post and paste it into the web form, there are additional questions asked that only you can answer.



                  FileMaker, Inc. 

                  • 6. Re: Find Mode in IWP
                       Ok great thank for all your help
                    • 7. Re: Find Mode in IWP

                      Actually, you can, but it requires editing the iwp.js file.

                      1. Create an invisible button that executes a script.  The script should perform the find (or whatever else you need it to do).
                      2. Place this button at the top left of all desired layouts and send it to the back (behind all other elements on the layout).
                      3. Add this to the top of iwp.js:

                      window.addEventListener('keypress', function (e)
                          var mode = top.iwp.bodyFrame.iwpinfo.mode;

                          if (mode == 'find') {  // Can be 'find', 'browse' for different desires
                              if (e.which == 13) {  // Keycode 13 = Return
                                  top.iwp.executebuttonscript(2,1,1);  // Executes top leftmost button on layout
                      ) ;