Agent help

I do slmost all of my coding with formula langauge, just haven’t had the time to sit down and learn LS. Is there a way in Formula that I can write an agent that counts the records in a database that meet certain criteria? I’m looking to write an agent that looks at all the records in a DB that have “open” in the status field. And then tally’s up how many of those have been created in the last 24 hours, last 48 hours, 48 hours+. It seems simple to me, but I’m not seeing a way to do it in formula language. If I do have to use LS, can someone point me at where to start? Thanks

Subject: Agent help

Thanks a lot for the info. Looking at my original post I guess I forgot one key detail. The reason I was trying to setup an agent for this was to schedule it to run daily and send out an email about the open records. Basically this is for a help desk application and we wanted some automated agent to send out an email to the helpdesk group every night to remind us of how many records we have <24 hours, 24 - 48 hours, 48+. I totally get the view setups you mentioned but I still have the problem of emailing that info.

Subject: RE: Agent help

Once you have the column totals, it’s simple to send an email, using @MailSend( sendTo ; copyTo ; blindCopyTo ; subject ; remark ; bodyFields ; [ flags ] ). To get this whole thing to run daily, you need to code it up as an agent.

Subject: Agent help

What you could do is create a View with the Selection formula to only show those documents that have “Open” for the status.

Then in your first Column have it catagorize with your formula to adjust for 24 hours, 48 hours, 48 hours +. You can do this off of the date field that you created or @Created.

(use vDate := TextToDate(Today) when comparing dates. if you just use @Today, the view will take forever to open each time.)

Hope this helps.

Subject: RE: Agent help

Going with the view idea, categorizing by upto 24h, 24-48h and 48+ then you could have a column with 1 as the value and then turn on the totaling hide the details. Ta da you have your answers.