7 Replies Latest reply on Oct 17, 2012 1:54 PM by philmodjunk

    Value of a unstored field

    rudiwer

      Title

      Value of a unstored field

      Post

           Heyee,

            

           Is it possible to 'get' the value of a filled in field but not commited (when the layout is in add of change mode)

           I want to dispaly a message when leaving a field that may not be empty !

           The system gives only a warning when the record will be commited but i want the message when leaving the field and jump tothe following field !

            

        • 1. Re: Value of a unstored field
          schamblee

               Use the Script Trigger OnObjectExit, then create a script with a custom dialog box that displays the desired message.

          • 2. Re: Value of a unstored field
            philmodjunk

                 Or you can use OnObjectSave--only triggers when the value has been changed

                 or OnObjectValidate--if you want this to kick in before any data validation does.

            • 3. Re: Value of a unstored field
              rudiwer

                   heyee thanks,

                    

                   But isnt it so that i only can get the active value in the field after a commit ???

                   When i type for example 'test' in a field  'name' in add mode and i do not a commit

                   when i do a get(clients::name) the value will be empty ??

                   thats what i have or am i wrong ?? or do i something else wrong ???

                    

                   best regards

              • 4. Re: Value of a unstored field
                rudiwer

                     heyee again,

                     I have corrected the problem above but there still remains something strange

                     I trigger onobjectexit with :

                      

                         if get(clients::name="")

                              display message......

                             goto previous field

                       endif

                     the goto previous field will never be executed also when i change this in goto fieldname

                     The script jump simply everytime to the next field after client name !

                      

                • 5. Re: Value of a unstored field
                  philmodjunk

                       get(clients::name) ???

                       Do you mean GetFIELD ( clients:name ) ?

                       If so, that's not how this function should be used. I suggest looking it up in FileMaker help. GetField ( clients::Name ) returns the value of the field name stored in clients::name, not the value of Clients::Name. If you store the value "contacts::Address" in the Clients::Name field, GetField ( clients::Name) will return the value of teh Contacts::Address field.

                  • 6. Re: Value of a unstored field
                    rudiwer

                         heyee,

                          

                         Sorry for the moment i work with a dutch version of filemaker and the shit is that filemaker also translate all the functions in dutch !

                         So i mistranslated the commands i guess

                           I try to explain what i do and what i want :

                         I am on a field on a layout the fieldname is 'name' the file where the field in belongs is the file 'Clients'

                         I dont want that the field can be empty and i want to display a message when i exit the field not when i save the record

                          

                         What i do is the following :

                         on the trigger onobjectexit (hopefully correct translation)

                         i place a script

                              if(Clients::name="")

                                   Dispalymessage "not empty !" ...... (probably mistranslated but understandable ??? )

                              endif

                         this works but after pressing the ok button on the message screen the program jumps to the next field!

                         I place a goto previous field or i place a goto(clients::name)  (probably also mistranslated) after the display message

                         but he still jumps to the next field !

                         is this understandable ???

                         thanks in advance ??

                         Ands i buy me a english version of filemaker  !!! makes it a lot simpler 

                    • 7. Re: Value of a unstored field
                      philmodjunk

                           if(Clients::name="")

                                     Dispalymessage "not empty !" ...... (probably mistranslated but understandable ??? )

                                     Exit Script [ False ]

                                endif

                           will keep the cursor in the field. I suggest that you look up Script Triggers in FileMaker help. There's an entry there that documents whether or not Exit Script [False] will work or not with each given trigger.