Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

I'd like to thank AndyGaunt for helping me with my empty email field worries.

My next email woe is that I would like to regularly email students who have had one unexplained absence to warn them about it. I have set up a field called First absence warning sent, and I would like the script to input the current date into that field if they have not already been sent this warning, but if that field is not empty the script should just skip that record and move to the next one.

I've been racking my brain trying to figure it out but I can't. The main script that I have worked out is below. I'd be grateful for any help.

 Perform Find [ Specified Find Requests: Find Records; Criteria: Students::CountUnAbsences.calc: "=1" ] [ Restore ] 

Go to Record/Request/Page [ First ] 

Loop 

Perform Script [ "1 absence email" ] 

If [ IsEmpty ( Students::First absence warning sent ) ] 

Insert Current Date [ Students::First absence warning sent ] [ Select ] 

[color:"red"]Else??[/color]

End If 

Go to Record/Request/Page [ Next; Exit after last ] 

End Loop 

Halt Script  

Thanks!

Posted

You don't need an else if you just want to skip the records.

Perform Find [ Specified Find Requests: Find Records; Criteria: Students::CountUnAbsences.calc: "=1" ] [ Restore ]

Loop

Perform Script [ "1 absence email" ]

If [ IsEmpty ( Students::First absence warning sent ) ]

Set Field[ Students::First absence warning sent; Get(CurrentDate) ]

End If

Go to Record/Request/Page [ Next; Exit after last ]

End Loop

Note I removed superfluous steps like the Go to Record/Request/Page [First] after a Perform Find and a Halt Script at the end of a script.

This topic is 7399 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.