chrisknight55 Posted March 16, 2011 Posted March 16, 2011 Instead of finding records within a fixed range 03/16/2011...03/30/2011 I want to find based on variable dates, so that I have a set that always shows me dates in the upcoming two weeks //... //+14 doesn't work >=// AND <= //+14 doesn't work Thanks for the help
comment Posted March 16, 2011 Posted March 16, 2011 Try using the Get(CurrentDate) function. Note that this cannot go into a stored request - you must either use the Enter Find Mode [] Set Field [ SearchField ; calculated criteria ]] Perform Find [] structure, or pre-calculate the criteria into a script variable.
chrisknight55 Posted March 16, 2011 Author Posted March 16, 2011 Thanks. I'm getting closer. My plan is to have a series of buttons, each set to Perform Script ["FindCurrentStudents"; parameter "TermX"] Where TermX is "Term1" or "Term2" or "Term3" Script "FindCurrentStudents" is: Enter Find Mode[] If [ Get (ScriptParameter) = "Term1"] Insert Calculated Result [select; Students::Start; Get (CurrentDate ) -28 & "..." & Get ( CurrentDate )] Else If [ Get (ScriptParameter) = "Term2"] Insert Calculated Result [select; Students::Start; Get (CurrentDate ) -56 & "..." & Get ( CurrentDate ) - 28 ] Else If [ Get (ScriptParameter) = "Term3"] Insert Calculated Result [select; Students::Start; Get (CurrentDate ) -84 & "..." & Get ( CurrentDate ) - 56 ] Endif Perform FInd [] The individual range statements work fine. How do I pass this parameter properly in the Perform Script statement?
comment Posted March 16, 2011 Posted March 16, 2011 How about making the script parameter 1 or 2 or 3, then: Enter Find Mode [] Set Field [ Students::Start ; Get (CurrentDate) - 28 * Get (ScriptParameter) & "…" & Get (CurrentDate) - 28 * ( Get (ScriptParameter) - 1 ) ] Perform Find []
chrisknight55 Posted March 17, 2011 Author Posted March 17, 2011 Yes, that works great. Thanks for the insight :)
Recommended Posts
This topic is 5002 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