jstaphse Posted May 2, 2008 Posted May 2, 2008 I'm re-writing some of my find scripts and running into a brick wall with the perform find script step. I'm trying to find the records created in the current month, using either a variable or a calculation of Month(date). The problem I'm running into is the validation of the date field when using the PerformFind(Restore) Step. My old way of; Set Variable $Month;Month(date) enter find mode set field; datefield;$Month perform find works, but this seems like a lot of extras just to find records created in the current month. Am I missing something?
comment Posted May 2, 2008 Posted May 2, 2008 No. Stored requests are literal - they cannot use a calculation or a variable.
LaRetta Posted May 2, 2008 Posted May 2, 2008 Since you are looking for the current month always, you don't need to use a variable. You can handle it this way: Enter Find Mode [ ] uncheck pause Set Field [ datefield ; Month ( Get ( CurrentDate ) ) ] Perform Find [ ] This will give you all records for the current month/year. LaRetta :wink2:
jstaphse Posted May 2, 2008 Author Posted May 2, 2008 Thanks LaRetta. The finds in question actually have several attributes that are being searched for. This was my reasoning behind using the variables. I was really looking for a way to tidy up the script and use the Perform Find Script step to include the various parts. Maybe in a future release we can use variables in stored finds. Thanks for the help. Since you are looking for the current month always, you don't need to use a variable. You can handle it this way: Enter Find Mode [ ] uncheck pause Set Field [ datefield ; Month ( Get ( CurrentDate ) ) ] Perform Find [ ] This will give you all records for the current month/year. LaRetta
Recommended Posts
This topic is 6109 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now