5 Replies Latest reply on Jun 13, 2016 9:38 AM by gabo57

    URGENT when the field value is active


      In one LAYOUT in  an environment of NEW RECORD when I fill data in  the TextBox1 and step with TAB to TextBox2



      a) I have access to data from TextBox1 for the script

      Set Variable [ $$variable1 ; Value : Tableone:: datoTextBox1 ]

      b ) Or I need  make a Commit  chained to a trigger as OnObjectExit

      Thank you

        • 1. Re: URGENT when the field value is active



          in a script, you can always access the fields of the TO the Layout is based on. The question is when will you try to access TextBox 1 ? The answer will tell you when the script has to be run. If you need to run it once the contents is changed, then you need to attach the script to OnObjectExit.


          What problem do you need to solve ? Knowing that will help others help you.

          1 of 1 people found this helpful
          • 2. Re: URGENT when the field value is active

            roll your own when you have such doubts, see enclosed.

            1 of 1 people found this helpful
            • 3. Re: URGENT when the field value is active

              Hello planteg
              thanks for your prompt response

              My problem or doubt is closely linked in the way I have defined my prinicial key in this table specifically with the parameter when it increases I have to be increased at the time of CREATION
              and may need to change it to increase in the time of COMMIT

              What do you think?

              Anyway today I realize I mention testing and results

              Thank you.

              • 4. Re: URGENT when the field value is active

                I think I may get it.  Here how it works in SAP BusinessOne, an ERP solution.


                This is an example for Invoices. In a table is maintained the next value for an Invoice number. Each Invoice has two numbers that identify it: an internal number that is much like the auto-number in FileMaker, and the Invoice number that is used by the customer to reference a specific document. Suppose three users start creating a Invoice at (almost) the same time, and that the next auto-number is 1025 and next Invoice number is also 1025. Here is what happen:


                UserEventAuto-numberInvoice number
                User_1Start creating an invoice1025Tentatively 1025
                User_2Start creating an invoice1026Tentatively 1025
                User_3Start creating an invoice1027Tentatively 1025
                User_3Commit the invoice10271025
                User_2Cancels the invoicenumber 1026 not usedN/A
                User_1Commit the invoice10251026


                Internally, the auto-number is used to link Invoices to Invoices_line_items, payments, etc.


                Would that apply to your situation ? It's more complicated, and sometimes you may need to correct the next Invoice number: the auto-number may have holes in it, the Invoice number should not. When I use auto-numbers, I prefer to assign it when the record is committed, otherwise you would need to be able to re-use numbers that were 'cancelled', more complicated then.

                1 of 1 people found this helpful
                • 5. Re: URGENT when the field value is active

                  Hello Planteg

                  I discovered my mistake

                  I found a syntax error when to a copy of a global variable to my field of my database , but as it no showed me error, i´m going to head.

                  It is wrong to work with the PRO version .

                  In the Advanced version  has a DEBUG its more easy .

                  The good thing is that I learned a lot .

                  Especially the COMMIT that your example in a multi-user environment online very clear .

                  And a comment I found is that many developers who started with the first versions of FM have not been updated with the use of COMMIT that appeared in a newer version .


                  From Monterrey Mexico


                  Greetings and thanks