Thanks for the post!
Date_field_year should be a field that is set up to be a calculation under File>Define>Database
The calculation you would use under "Specifiy" would simply be "Year(date_field)" without the quotes.
Also pay attention to the "Calculation must result in" dropdown at the bottom of the "Specify" window.
Is that what you're after?
THANKS FOR NINJA.
Yes, you are right.
If I add date_field_year in table. I can fulfill my request.
But the problem is the database is not me. If that have method to find all current year records by using date_field. That is wonferful.
Anyone have another suggestion to help me?
Are you trying to convert the date in your date_field to be the same date, but current year i.e. 2008/01/22 will become 2009/01/22.
or are you trying to perform a find in the database that will result in a found set where of all records in the database where the date_field equals the current year.
Also the date format you are using yyyy/mm/dd is that the format FileMaker inserts or are you manually inputting the date?
Yes, I am trying to perform a find in the database that will result in a found set where of all records in the database where the date_field equals the current year.
The date format maybe I typed wrong. But I think that is not important.
I know that the formula is...
YEAR(date_field) ; Year(GET(CurrentDate))
But how can I input it in script window?
Or you have another method to do it?
OK What you want to do is create a script that does the following
Enter Find Mode 
Set Field [ date_field ; Year ( Get CurrentDate ) ]
Perform Find 
So looking at your original post you may be setting up the Set Field step wrong.
Specify the Set Field script step in the Edit Scripts window and where it says "Specify Target Field" click on Specify and in the dialog that pops up select your date_field field and click 'OK'
Then click 'Specify' next to the "Calculated Results" label and in the Specify Calculation dialog that pops up input teh following
Year ( Get CurrentDate )
Also with the Enter Find Mode script step make sure to deselect the option to Pause.
Let us know how you get on with this.
OK, I remember that I used to try it before and doesn't work.
I will try this one again tomorrow when I come back to office.
Also worth double checking that your date_field is set to Field Type: Date.
If what you are trying to do is find all records that have the current year's date on them, then the above solutions will work...
To find by your calculated "year" field, use the script:
Enter Find Mode
Are you setting your date_field during the find, or are you setting the date_field_year that captured only the year? It makes a big difference.
I only can make a field to store date_field_year to match current year to fulfill my request?