6 Replies Latest reply on Jul 20, 2009 11:57 AM by ric

    Launch a script from calculation rubrique

    ric

      Title

      Launch a script from calculation rubrique

      Post

      hi this is my problem if the id1 field is empty i want to show a popup window that tells i have to choose 1 of the 3 field

      and if not he say that it is not possible

      show custom dialogue and there i can put a number in it

       

      Case (not IsEmpty ( FMH ) or not IsEmpty ( FMM ); "";
      FML="1"; "L")& Case (not IsEmpty ( FMM ) or not IsEmpty ( FML ); "";
      FMH="1"; "H")
      & Case (not IsEmpty ( FMH ) or not IsEmpty ( FML ); "";
      FMM="1"; "M")& Case (not IsEmpty (id1); " launch scriptshow custom dialogue"

      thank you to think about

      ric


        • 1. Re: Launch a script from calculation rubrique
          edusouza
            

          Hello, Ric,

           


          ric wrote:

          hi this is my problem if the id1 field is empty i want to show a popup window that tells i have to choose 1 of the 3 field

          and if not he say that it is not possible

          show custom dialogue and there i can put a number in it

           

          Case (not IsEmpty ( FMH ) or not IsEmpty ( FMM ); "";
          FML="1"; "L")& Case (not IsEmpty ( FMM ) or not IsEmpty ( FML ); "";
          FMH="1"; "H")
          & Case (not IsEmpty ( FMH ) or not IsEmpty ( FML ); "";
          FMM="1"; "M")& Case (not IsEmpty (id1); " launch scriptshow custom dialogue"

          thank you to think about

          ric


           

          Let me see if I can debug your question:

           

          1. Your solution has a field -- for example -- id1;

           

          2. You want this field, if empty, to pops-up a value list with the options {1, 2, 3} when selected;

           

          3. Finally, you also want this field, if holding data, to show a custom dialogue stating "it's not possible to change data in this field" when selected.

           

          Is that it?

           

          Just a question, Ric: where are you from? If your native tongue is Italian, Spanish, Portuguese, or French, you may message me privately with your question and I'll post it here in English.

           

          Best Regards,

           

           

          E* 



          • 2. Re: Launch a script from calculation rubrique
            ric
              

            HI EDUSOUZA

            Thank for reply i am from brussels french spoken

            yesn my solution had a 3 field

            1. fmh

            2.fmm

            3. fml

             i put in one of the fields number 1

            when in field fmh content 1 he give me Letter h

            but if by mistake i put in the field fmm or fml and there is in field fmh also  1 then i have to get popup that this is not possible because fml and fmm is not empty

            thank to help me

            • 3. Re: Launch a script from calculation rubrique
              TSGal

              ric:

               

              Thank you for your post.

               

              IF you are putting "1" into the field, you can add up the fields to see if the value is greater than 1.  That means "1" occurs in two or more fields.  Therefore, you could calculation something like:

               

              Case ( fmh + fmm + fml > 1 ; "ERROR" ;

                 fmh = 1 ; "H" ;

                 fmm = 1 ; "M" ;

                 fml = 1 ; "L" ;

                 "" )

               

              or, if any value is entered into those fields...

               

              Case ( not IsEmpty ( fmh ) + not IsEmpty ( fmm ) + not IsEmpty ( fml ) ; "ERROR" ;

                 not IsEmpty ( fmh ) ; "H" ;

                 not IsEmpty ( fmm ) ; "M" ;

                 not IsEmpty ( fml ) ; "L" ;

                 "" )

               

              Let me know if you need clarification for any of the above statements.

               

              TSGal

              FileMaker, Inc. 

              • 4. Re: Launch a script from calculation rubrique
                ric
                  

                TSGAL

                Thank for your post

                This solution seem to be ok

                Case ( fmh + fmm + fml > 1 ; "ERROR" ;

                   fmh = 1 ; "H" ;

                   fmm = 1 ; "M" ;

                   fml = 1 ; "L" ;

                   "" )

                And i put also the condition if it show error set text in red

                Thank for that but one question is it possible that when the field give error that there show me a popup menu or window

                because if the person dont see it he can be warned by this popup.

                Best regard ric

                • 5. Re: Launch a script from calculation rubrique
                  TSGal

                  ric:

                   

                  I am glad the solution works for you.

                   

                  Yes, you can change the color to red if there is an error.

                   

                  Pull down the View menu and select "Layout Mode".

                   

                  Click once on your calculation field, pull down the Format menu and select "Conditional..."

                   

                  Click the "Add" button, and set it so "Value is" "equal to" and type in ERROR.  Next, check the box for "Text color", and to the right of that, click the fill and select the red color.  Click OK and go to Browse mode.

                   

                  If you enter a 1 in fmh, you should display "H" in black lettering.  If you then enter a 1 into fmm, your calculation field will now display "ERROR" in red lettering.

                   

                  Let me know if you need clarification for any of the above steps.

                   

                  TSGal

                  FileMaker, Inc. 

                  • 6. Re: Launch a script from calculation rubrique
                    ric
                      

                    thank tgal yes indeed it works now

                    But i try still to have popup when the color of the text in field is red

                    i working on it

                    Best regards ric