March 16, 201114 yr 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
March 16, 201114 yr 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.
March 16, 201114 yr Author 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?
March 16, 201114 yr 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 []
Create an account or sign in to comment