We like it for a reason.
For one thing I see Restore twice in your script but cannot tell from the script listing what stored criteria might exist in either step. Another reason is that you can do things with Set Field to set up a find that can't be done with stored criteria and this type of calculated find criteria is an example of that.
Then your set field step appears to be missing a parameter.
When Setting up Set Field, there are two Specify buttons that must be clicked. To get Set Field [Table::Field ; Expression], add set field to your script and click the first button (specify target field). Select Table::Field from the list of fields. Do not click the specify button next to the repetition box. Click OK to close this dialog box. Now click the lower specify button (calculated result) and create the expression to the right of the semicolon (;). Do not try to type in the semicolon.
The script that I would use:
Enter Find Mode 
Set Field [Pension_medarbejder::Pensiondato ; "<" & Get ( CurrentDate ) + 30 ]
Set Error Capture [on]
This script can still fail if Pensiondato is not a field of type date.
For more examples of scripted finds, see: Scripted Find Examples
Thanks alot Phil!
The Script works as a charm now.
- Even better with the Scripted finds, i'm sure I'll find something I can use there.
Have a good one!