14 Replies Latest reply on Nov 25, 2009 3:16 AM by StellaLuna

    ignore other fields in find request

    macamaca

      Title

      ignore other fields in find request

      Post

      I have a dedicated Find Mode layout with three fields, with three 'perform find' buttons adjacent, each running a different perform find script. 

       

       FieldA with adjacent button marked "Find FieldA records"  

       FieldB with adjacent button marked "Find FieldB records" 

       FieldC with adjacent button marked "Find FieldC records" 

       

      In each of the find scripts I need to make sure user input into the other fields is ignored.
      How can I do this?
       
      Thanks in advance. 
       

       

        • 1. Re: ignore other fields in find request
          StellaLuna
             On the fields you don't want them to find in, uncheck in field behavior that they can enter field in find mode. :smileyhappy:
          • 2. Re: ignore other fields in find request
            raybaudi
              

            Stella Luna wrote:


            On the fields you don't want them to find in, uncheck in field behavior that they can enter field in find mode.


            This doesn't solve the problem... how can you know wich field will be used for the search ?

            • 3. Re: ignore other fields in find request
              StellaLuna
                

              raybaudi wrote:

              Stella Luna wrote:


              On the fields you don't want them to find in, uncheck in field behavior that they can enter field in find mode.


              This doesn't solve the problem... how can you know wich field will be used for the search ?


              Because the developer chooses which fields the person can search. 


              • 4. Re: ignore other fields in find request
                ninja
                  

                Howdy macamaca,

                 

                Make the three fields on your find layout "FInd fields" (ie. not pertinent data-holding fields in your record) and have them be global storage.

                Perhaps name one "gFieldA".  When a person goes to the "find layout", you should be in Browse Mode, NOT Find mode.

                 

                Then on the Find FieldA script:

                 

                SetVariable [$FieldA ; gFieldA]

                Enter Find Mode

                SetField [FieldA ; $FieldA]

                Set ErrorCapture [on]  ##optional##

                Perform Find[]

                Setfield [gFieldA ; "" ]

                GotoLayout [whatever you want]

                 

                do the same for fields B and C.

                 

                This traps only the single value you want to look for, thereby ignoring the other two, and clears the global value back out when finished.  using the Setfield function makes it so that the presence of "real" fields on the layout is not required.

                Is this what you're after?

                • 5. Re: ignore other fields in find request
                  raybaudi
                    

                  Stella Luna wrote:

                   

                  Because the developer chooses which fields the person can search. 


                  So you should say to macamaca that he needs 3 layouts, each one with ONLY one search field...


                  but even so that answer will not satisfy his requests. ( as I said: This doesn't solve the problem )

                  • 6. Re: ignore other fields in find request
                    raybaudi
                      

                    macamaca wrote:

                     

                    In each of the find scripts I need to make sure user input into the other fields is ignored.


                    My proposal: use ONLY one search field ( global ) and search in different fields by using your different buttons.

                    • 7. Re: ignore other fields in find request
                      ninja
                        

                      The single global search input field would work fine (as opposed to my proposed three) but I wonder which would be more intuitive for the user.  I figured that three, one for each button, would be more intuitive...but intuition is not constant across humanity ;) .  What I find comfortable others may find not so comfortable.

                       

                      At that point it's solely preference...

                       

                      The function of the global used to set the find criteria is what the OP is looking for IMO.

                      • 8. Re: ignore other fields in find request
                        philmodjunk
                          

                        Agreeing with Ninja...

                         

                        Sometimes, multiple global search fields are a good idea due to the fact the data types of each field may be different. You might also want different value list formats for each. A date field might be formatted to pop-up a calendar--to give one example.

                        • 9. Re: ignore other fields in find request
                          StellaLuna
                            

                          raybaudi wrote:

                          Stella Luna wrote:

                           

                          Because the developer chooses which fields the person can search. 


                          So you should say to macamaca that he needs 3 layouts, each one with ONLY one search field...


                          but even so that answer will not satisfy his requests. ( as I said: This doesn't solve the problem )


                          You cannot say what this person needs and I would not suggest three layouts.  They said, "In each of the find scripts I need to make sure user input into the other fields is ignored."  It sounds to me like they know what other fields should be ignored.  You don't know everything.  Why not let the person speak for themselves instead of you telling me what they need.:smileymad:


                          • 10. Re: ignore other fields in find request
                            ninja
                              

                            Taking the risk of becoming a secondary target,

                             

                            which I would very much like to avoid,

                             

                            perhaps y'all might consider sending each other Private Messages rather than arguing in the public forum?

                             

                             

                             

                            Just a thought...and a risk on my part to post.

                            • 11. Re: ignore other fields in find request
                              StellaLuna
                                 I agree Ninja.  These boards are for everyone to offer their ideas.  The person takes the one they like.  There is no need to nitpik someone.  Ray has been doing it to many on here.  He even told me I could do better than a calculation I gave (which was right and which the person wanted to use).  Not necessary at all to nitpik people.  It even says so in the rules.
                              • 12. Re: ignore other fields in find request
                                macamaca
                                  

                                Many thanks Ninja.

                                Your solution was right on the money.

                                Exactly what I needed.

                                Thanks for correctly interpreting my (perhaps too) brief OP.

                                • 13. Re: ignore other fields in find request
                                  raybaudi
                                    

                                  My participations in this Forum, like also in others, always are centralized in finding the better solution ( or conceptually or practically ) to the given problems.

                                   

                                  Sometimes I succeed, sometimes not… but I'm always ready to appreciate the job of the others or to criticize it, with the lone attempt to catch up, I do not say the perfection, but at least the best that can be obtained from the participants to the Forum.

                                   

                                  Unavoidably someone takes offense and I'm sorry, but no offensive attempt is present in what I write.

                                   

                                  I however accept any critic gladly.
                                  ------------------------------------------
                                  I miei interventi in questo Forum, come anche in altri, sono sempre incentrati nel trovare la soluzione migliore ( sia concettualmente che praticamente ) ai problemi proposti.

                                   

                                  A volte ci riesco, a volte no... ma sono sempre pronto ad apprezzare il lavoro degli altri o a criticarlo nel solo intento di raggiungere, non dico la perfezione, ma almeno il meglio che si possa ottenere dai partecipanti al Forum.

                                   

                                  Inevitabilmente qualcuno si offende e me ne dispiace , ma nessun intento offensivo è presente in quello che scrivo.

                                   

                                  Io comunque accetto volentieri qualsiasi critica.

                                  • 14. Re: ignore other fields in find request
                                    StellaLuna
                                      

                                    My participation in this forum is to try to help others.  As said in the rules here, it is wonderful that we all can offer ideas.  Some work, some won't.  The success or failure of our suggestions happens in which solution the person posting ends up using and whether they give us a mark or kudo.  If we get no response to our idea then it didn't work for them but it might work in other instances. 

                                     

                                    We don't need others telling us our ideas aren't what someone needs.  It is one thing to tell someone their calculation will break or their idea might harm the person posting but it is another to simply criticize someone to make oneself feel superior.  None of us always knows the best answer because we are dealing with interpretion and words on a thread and that is why all ideas are appreciated.  Sometimes someone new like me can actually see something someone else can't.

                                     

                                    "but I'm always ready to appreciate the job of the others or to criticize it,"

                                     

                                    This is what I take exception to.  What gives anyone a right to criticize another who is posting to help?  As said, unless the information is incorrect, the rest is open to interpretation.  To step in to criticize a suggestion made by another (especially doing it more than once on the same post, as in this case) is simply unnecessary and demeaning.

                                     

                                    I don't speak another language so I'll just have to say this in American, "Nobody is better than anyone else even if they think they are.  And this forum is for everyone to help."

                                     

                                    By the way, rabaudi, your idea wasn't accepted any more than mine.  It is a good thing more than just us posted different approaches.