7 Replies Latest reply on Apr 6, 2013 12:21 AM by gullfounder

    Get current month name

    gullfounder

      Title

      Get current month name

      Post

           hi,

           I am trying to write a script. In which i want to get current month name only. How can i get it?

            

           second: i am triverse the record of students Fee. and check that, if he had paid the his previouse months Fee or not.

           I have following tables and there relationship.

           Student(To store student name, father name....etc)

           Class(to store in which class is the student)

           Fee and Fee detail(to store which months fee has been paid of the student)

           Vouchers(This is where new voucher are printed for each student ).

           I am also attaching file for reference.

           user:admin

           pass:1234

           https://www.dropbox.com/s/ekcio8y3d0yt4fk/Al-Pine_Fees.fp7

        • 1. Re: Get current month name
          symbister

               there's a built-in MonthName(date) function returns the month name of given date

          • 2. Re: Get current month name
            mickwilli

                 A quick look at the Filemaker Function's Reference guide show's that there is a convenient Filemaker function for this exact purpose.

                 The function is "MonthName" and here's an excerpt of the function's reference:

                  

                 

            MonthName

                 

            Purpose

                 

                      Returns the full name of the month for date. Format

                 

                      MonthName(date)

                 

            Examples

                 

                      MonthName(“6/6/2014”) returns June.

            Now if you want to get the name of the current month, just pass the Get CurrentDate function into the function. The it'd look like:

            MonthName ( Get ( CurrentDate ) )

            This will return the month name as text, e.g. "March"

                 As for your second question, that really should be another forum post. I've had a quick look at your file, but I don't understand exactly what your file is trying to do and what you're asking. Can you explain more carefully what you're trying to do with both the file and your question?

                 As a side note, do you know you can automatically pass text from a field into a text object? Simply use << >> and in the middle put the name of the field exactly as it's entered in Filemaker and when you switch to Browse mode, Filemaker will put the text from the field into the text object. This is good for situations where you want to merge static text with information from Filemaker records such as in your letter layout. This will result in a much better looking output. You can also use a calculation field to automatically take the data for gender and turn it into either a His or a Her so that you can be specific in your letter rather then being general.

                 I hope that helps.

                  

            • 3. Re: Get current month name
              gullfounder

                   "This will result in a much better looking output. You can also use a calculation field to automatically take the data for gender and turn it into either a His or a Her so that you can be specific in your letter rather then being general."

                   I dint know that part. Ca  u link me a Example for that part?  But thanks for month info tho.

                   Regarding my other question. I will make New post of it. and link it here.

              • 5. Re: Get current month name
                mickwilli

                     In answer to your question about how to calculate the words, use the Case function in a calculation, for example:

                     Case ( TONAME::Gender = "Male" ; "him" ; TONAME::Gender = "Female" ; "her" )

                     This calculation will return "him" when the "Gender" field is equal to "Male" and will return "her" when it equals "Female". This should do what you want quite easy, although I admit I haven't tested my calcuation above, so it may require a tweak.

                • 6. Re: Get current month name
                  symbister

                       although in these days of political correctness, you might like to consider making letters non-gender-specific :)