I’m looking for ideas on how best to code a reminder agent which needs to evaluate multiple fields on a form. The form is designed to perform an action tracking function and contains an expandable table (up to 25 rows) containing milestone, actionee, due date and status. The fields in each row are named like this:
event1 assigned1 date1 status1
event2 assigned2 date2 status2
etc…
I need to write a script that will loop through a collection of documents, evaluate each row, and if the status = “Open” check the corresponding date value and see if the date is later than today. If so, send a later reminder to the corresponding actionee, and incluide the event description in the body of the e-mail.
Any ideas how to approach this using script? I can usually get going once I have an understanding of the basic code logic to use. Thanks for any suggestions.
Subject: Reminders sent based on multiple fields on a form
I would start by creating a view with the criteria that you need (status = “Open”, catagorized by date). Then you can write the script on the documents in the view.
If the database and the view aren’t too big, I would use @Now or @Today (not a good practice, but it works in this case). If there are a lot of documents in the database, its better to evaluate the date in your script.
Subject: RE: Reminders sent based on multiple fields on a form
Thanks for the reply!
I was thinking of making a hidden multi-value field at the bottom of the form which builds a concatenated string (using “~” between each value) for each of the open action fields, and then displaying them in a view using the “show multiple values as separete entries” column setting.
Then I could set up an agent to run on each separate line in the view, extract the necessary data from the concatenated strings and send the reminder based on the date in each row of the view. Do you think this would work?