Jump to content

Perform Find with variable dates


This topic is 4761 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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 []

Link to comment
Share on other sites

This topic is 4761 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.