12 Replies Latest reply on Apr 28, 2014 7:10 AM by umendes

    field update in a script

    umendes

      I want to update two fields in a script. (confirmed and confirmdate)

      If i print a document (confrimation) , i want to update those two fields, The first logical field to "YES"  and the second with the date of today.

      How can i do this ?

        • 1. Re: field update in a script
          MichaelManousos

          I think that first of all you dont need two filed just the confirmdate. If is empty the confirmdate then its not confirmed and the other way.

          In the script your firt step is to show a print dialog and if its not canceled the print step the next step is to set field (current date) with a current timestamp (better to have the time also)

          • 2. Re: field update in a script
            coherentkris

            Set Field http://www.filemaker.com/11help/html/scripts_ref1.36.39.html

            or

            Set Field By Name http://www.filemaker.com/help/html/scripts_ref1.36.40.html

             

            Just a thought...you might want to use a number field with True(1) and False(0) as the boolean values instead of "yes" and "no". I have never been a fan of yes no except for display purposes.... but thats just me

            • 3. Re: field update in a script
              umendes

              Thanks for your answer.

               

              I am having a Dutch system.

               

              I still do not know how the syntax is :

               

               

              In the script i have this line :

              inschrijvingen::bevestigingsdatum = Date ????

               

              Tabel = inschrijvingen

              Confirmdate = bevestigingsdatum

              How and where do i specify the date of today ?

               

               

              Thansk for your answer

               

              Urfried Mendes

               

               

               

               

              Op 28 apr. 2014, om 14:19 heeft MichaelManousos het volgende geschreven:

               

               

              created by MichaelManousos in DevCon - View the full discussion

              I think that first of all you dont need two filed just the confirmdate. If is empty the confirmdate then its not confirmed and the other way.

               

              In the script your firt step is to show a print dialog and if its not canceled the print step the next step is to set field (current date) with a current timestamp (better to have the time also)

               

              Reply to this message by replying to this email -or- go to the message on FileMaker Technical Network

              Start a new discussion in DevCon by email or at FileMaker Technical Network

              Manage your email preferences.

               

              FileMaker Developer Conference 2014 • San Antonio, Texas • July 28-31 • www.filemaker.com/devcon

               

              • 4. Re: field update in a script
                umendes

                Thanks for your answer.

                 

                I am having a Dutch system.

                 

                I still do not know how the syntax is :

                 

                 

                In the script i have this line :

                inschrijvingen::bevestigingsdatum = Date ????

                 

                Tabel = inschrijvingen

                Confirmdate = bevestigingsdatum

                How and where do i specify the date of today ?

                 

                 

                Thansk for your answer

                 

                Urfried Mendes

                 

                Op 28 apr. 2014, om 14:30 heeft coherentkris het volgende geschreven:

                 

                 

                created by coherentkris in DevCon - View the full discussion

                Set Field http://www.filemaker.com/11help/html/scripts_ref1.36.39.html

                 

                or

                 

                Set Field By Name http://www.filemaker.com/help/html/scripts_ref1.36.40.html

                 

                Reply to this message by replying to this email -or- go to the message on FileMaker Technical Network

                Start a new discussion in DevCon by email or at FileMaker Technical Network

                Manage your email preferences.

                 

                FileMaker Developer Conference 2014 • San Antonio, Texas • July 28-31 • www.filemaker.com/devcon

                 

                • 5. Re: field update in a script
                  coherentkris

                  set Field ( your field ) = Get(CurrentDate)

                  • 6. Re: field update in a script
                    MichaelManousos

                    Set Field (Get Current(Timestamp)) or date

                    • 7. Re: field update in a script
                      umendes

                      Thanks you .

                       

                      This helps.

                       

                      Is there a way to change a logical field from NO in to YES

                       

                      set Field ( database field ) =

                       

                       

                       

                       

                      Op 28 apr. 2014, om 14:34 heeft coherentkris het volgende geschreven:

                       

                       

                      created by coherentkris in DevCon - View the full discussion

                      set Field ( your field ) = Get(CurrentDate)

                       

                      Reply to this message by replying to this email -or- go to the message on FileMaker Technical Network

                      Start a new discussion in DevCon by email or at FileMaker Technical Network

                      Manage your email preferences.

                       

                      FileMaker Developer Conference 2014 • San Antonio, Texas • July 28-31 • www.filemaker.com/devcon

                       

                      • 8. Re: field update in a script
                        erolst

                        coherentkris wrote:

                        Just a thought...you might want to use a number field with True(1) and False(0) as the boolean values instead of "yes" and "no".

                         

                        Amen to that. This makes it much easier to query the field as a boolean value.

                        coherentkris wrote:

                        I have never been a fan of yes no except for display purposes.... but thats just me

                         

                        You can use the Inspector's formatting options to display a 1/0 field as 'Yes'/'No' (or other (short) strings).

                        • 9. Re: field update in a script
                          erolst

                          umendes wrote:

                          Is there a way to change a logical field from NO in to YES

                           

                          set Field ( database field ) =

                           

                          Set Field [ YourTable::yourBooleanField ; NOT YourTable::yourBooleanField ]

                          • 10. Re: field update in a script
                            umendes

                            Thanks,

                             

                            it\s working now.

                             

                            Where can i find a list of SystemField like Get(CurrentDate) etc.

                             

                             

                            Regards

                             

                            Urfried Mendes

                             

                             

                            Op 28 apr. 2014, om 15:53 heeft erolst het volgende geschreven:

                             

                             

                            created by erolst in DevCon - View the full discussion

                             

                            • 11. Re: field update in a script
                              erolst

                              umendes wrote:

                              Where can i find a list of SystemField like Get(CurrentDate) etc

                               

                              coherentkris already posted two links to references of specific script steps in the FileMaker Help system; use this as a starting point into the online help for FM 11 (it's the same contents as in the built-in help, but IMO easier to use and search).

                               

                              If you have FM 12 or 13, use

                               

                              http://fmhelp.filemaker.com/fmphelp_12/en/index.html or http://fmhelp.filemaker.com/fmphelp_13/en/index.html, respectively

                              • 12. Re: field update in a script
                                umendes

                                Thanks

                                 

                                I have seen it .

                                 

                                With regards

                                Urfried Mendes

                                 

                                Op 28 apr. 2014, om 16:04 heeft erolst het volgende geschreven:

                                 

                                 

                                created by erolst in DevCon - View the full discussion