10 Replies Latest reply on Mar 21, 2017 3:57 PM by sstpierre

    How to recreate FM Find Mode + New Request

    sstpierre

      Hi!

      I'd like to know how could I FM Find Mode + New Request

      with two btn on a layout as I hide tool bar from users ?

       

      What I want to achieve is the possibilities to Find (with pause for the user to enter stuffs)

      and execute the find via "enter" key - as it is, or via a btn

       

      But if the user click again my "Find" btn it actually does a new request

      and then fire via enter or the other btn.

       

      I got my script work to check window mode, everything is find, capture errs, no user abort.

      But the result are not the same and it get stuck in pause...

       

      any clue ?

      tx alot

        • 1. Re: How to recreate FM Find Mode + New Request
          philmodjunk

          New Record/Request

           

          Is a script step that creates a new record in Browse mode, but creates a new Request when in Find mode.

          • 2. Re: How to recreate FM Find Mode + New Request
            sstpierre

            Tx Phil

             

            What should I look for best practice in this simple solution ?

             

            If find mode

                new/request

                ? Does it goes in pause ?

                ? Execute find ?

            if browser mode

                Find mode with pause

                ? Execute find ?

             

            What is the rule in find mode with pause

            vs enter key ? How does FM deals with it, because it doesn't records the first find request ?

            Tx

            • 3. Re: How to recreate FM Find Mode + New Request
              philmodjunk

              I don't understand your question. There are many different approaches that developers use to provide scripted support for finding records.

               

              I prefer methods patterned after those found in this thread:

               

              Scripted Find Examples

               

              They are different from what you are doing here--though I'm not sure exactly what you are doing..., but that doesn't make me right and others wrong when they use a different approach.

              • 4. Re: How to recreate FM Find Mode + New Request
                BruceRobertson

                It would probably help a lot if you can put together a simple example file, post it here, and get some suggestions.

                 

                As with your recent thread on the Insert command, there are basic scripting features from the days of FileMaker 6 and earlier that you are not using effectively; let alone more modern techniques.

                • 5. Re: How to recreate FM Find Mode + New Request
                  sstpierre

                  Hi! Bruce

                   

                  Following poeple and making remarks over past thread is... kind of special. And leeds to what... ?

                  I know FM since version 3

                  And I'm at 15 advanced.

                  Did a greate jump between 6 and 11...

                   

                  But, please, try this at home : Cancel an insert script steps and look what's happening.

                  Does is really what you want: FM to remove what was there? NO you actually wanted to cancel the insertion of something, right? Not the removal. And in dev it is call a misbehavior, unergonomic, an not very logic too, anyway.

                   

                  I'm a reg dev (c++ java python and the like) I'm no admin guy that click all the times!!

                  But yes FM did a greate make over since 12, 13 (gui) and 14 for us dev guys!

                  And please - I'm not talking about anybody, as I don't know everybody

                   

                  FM is a greate product, but very slow and conservative in dev. It suppose to be an IDE for greate development

                  but we still have to hard code many things like imports and we have to overcomes rounded corners that FM push us in.

                   

                  When you are used to header files, template, object models, polymorphism, inheritance, etc and you try to do things in the FM way, you sometimes tears your hair apart!!

                   

                  So... Bruce. I don't know you and I don't look at pedigre before answering question: I'm reading the question, the present ones, and answer it!!

                   

                  Mine, was to actually provide my users with custom btn that do exactly what FM does with

                  new/request and execute

                   

                  Read on top, everything is there. Know about window mod, catching err, etc

                  But wanted to know how does FM is dealing with [pause] and "enter Key"

                   

                  Do we need to ask FM to pause after an new/request script steps ?

                  It's a simple replacement of FM action. No Globals or new window, and playing around, etc. Simply custom btn that does simple thing. Every solution as is way, and mine - now - doesn't need to much complexity.

                   

                  Just like FM does it: simplicity is the way to go

                   

                  No need to post simple srcipts steps as they are so basic. I think that my script interfere with other script.

                  I did answer Phil questionning me this:

                   

                  If find mode

                      new/request

                      ? Does it goes in pause ?

                      ? Execute find ?

                  if browser mode

                      Find mode with pause

                      ? Execute find ?

                   

                  For you to have an idea of what I'm talking.

                   

                  Just basic script steps that mimik FM so to have custom btn on my navig barre.

                  tx a lot.

                   

                  Have a nice day Bruce

                  And to Phil as well

                  • 6. Re: How to recreate FM Find Mode + New Request
                    philmodjunk

                    It really depends on exactly how you want to set this up.

                     

                    One button can put the Window in Find Mode. That Mode change can make your "new request" button visible. It can have new record/request as it's only script step. A different button can be set up with Perform Find.

                     

                    But that's just one possible scenario. The first button could enter find mode and pause with script steps after the pause that performs the Find and sorts records or other actions that work with the found set thus produced.

                     

                    In either scenario, there is no need for the new request button to pause.

                     

                    Other scenarios are also possible.

                    • 7. Re: How to recreate FM Find Mode + New Request
                      sstpierre

                      Yes indeed I do have other things to do after, like sorting and/or showing rec if no found set, etc.

                       

                      I did what you suggest, very minimalistic and still FM is waiting.

                      Tryed to fire the perform find via btn and - I suppose is what happening - via "enter key" after editing some field.

                       

                      But still I have to clike twice over "enter key" or only one time after the btn click (that as a simple perform find script step)

                       

                      No user Abort is allowed and did tryed with and without set errors capture.

                       

                      My full script got call to other script that set to got in browser mod, so I think that one possibilities

                      why my find and add new request did catch only one request - the last one.

                       

                      But now I can't explain why I have to click twice "enter key" or once but after the "Perform script step" - via a btn

                      to actually get out of that "pause".

                       

                      My field are not set to go to other filed on "enter" or "return" key

                      I know validation is fired with "enter" key. But does it also - in find mod - call the perfom find mecanism when in new/request steps?

                       

                      That's the whole point here.

                       

                      tx Phil

                       

                      I"ll look further, if you have other concerns or suggestion I'm pleased.

                      • 8. Re: How to recreate FM Find Mode + New Request
                        sstpierre

                        Did saw example where they used "Halt script" after "Perform" and the if branching that check for err no 400 and 401

                        and all the stuf you want to do in those cases. (so they call "Halt Script" in there, at the end of every "IF" branching)

                         

                        Does it make any sense ti you ?

                        • 9. Re: How to recreate FM Find Mode + New Request
                          philmodjunk

                          Take a look at this demo. It has two layouts that seem identical. But one pauses in find mode when you click "find" and the other does not. both allow you to click a "new request" button to add more find requests. Both find and then sort the records thus found.

                           

                          Note the differences in UI behavior between the two as the second replicates the normal behavior that you'd get if you just used the standard menu options and tool bar buttons while the "paused state" disables a lot of menu options--which may or may not be a good thing.

                          • 10. Re: How to recreate FM Find Mode + New Request
                            sstpierre

                            Thank you very much Phil for the demo

                             

                            So FM is serving us a Find Mode [] (in the Built-in unique action) with a Find Mode [Pause:No]

                             

                            And is better responding. No "Enter Key" side effect.

                             

                            That's why I saw halt script steps - to get out of the pause mode.

                             

                            I'll with that and a beer !

                            tx.