It's been a while since I've messed with cfpop, but if you get the messages in a query, the best way to get the list of message numbers is probably the ValueList(query,"column") function.

As for keeping messages to one tech, you just need a simplistic locking mechanism. You might use a cache in the application scope.

For example, put a struct in Application.locks.lockedTechMail with keys of the locked message numbers and values of the tech currently working on them or any other values you need to determine who is allowed to work on the mail, etc. I would highly recommend wrapping this logic in an object specifically for this purpose as it will make it very simple to use.

Also, consider that by storing data in the application scope, there is the potential for loss if you don't store it anywhere (when the application scope gets refreshed, server restart, etc.) so you may also update your database or write them to a file as well when the data changes. The plus side is this will give you quick access to what messages are being used at any time.

On the other hand, using the data strictly from your table has the benefit of being selectable when you display your grids so you can show some symbol to identify issues in progress or not show them at all.

Hope that helps with your second part hehe, just some thoughts that went through my head.

Mike.

On 7/16/06, Tim Starling < [EMAIL PROTECTED]> wrote:

ArrayToList to list worked on my first issue.  Any feedback on the other issue would be very appreciated.

 

Thanks,

Tim

 

Tim Starling
Project Manager Web
Global Aid Network

A ministry of Campus Crusade for Christ International
972-234-0800, extension 1335
www.gainusa.org


From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED]] On Behalf Of Tim Starling
Sent: Sunday, July 16, 2006 5:35 PM
To: Dallas/Fort Worth ColdFusion User Group Mailing List
Subject: [DFW CFUG] cfpop

 

I hope this is very simple and I'm just overlooking the obvious.  I am using cfpop to go out and get e-mail from an account where tech support messages are sent.  The messages are then saved in a table. Those two items work fine….  I want to then delete those messages from the account.  Cfpop has that option but I am having trouble creating the list of messagenumber's from the original cfpop query into a text list that I can populate into the second cfpop on the page that will delete all the retrieved e-mails.  I would rather not loop of the query creating multiple cfpop calls deleting them one at a time if I can help it.

 

Here is my sequence:

 

  • Cfpop to get the e-mails

 

  • Cfquery to insert the data into the database

 

  • Cfpop to delete the downloaded e-mails from the server (where I am having problems)

 

 

 

<cfpop server="
mail.company.com"
  username=#username#

  password=#password#
  action="">

  messagenumber="#need my comma delimited list here#">

 

I thought I would use cfoutput with cfset to create a comma delimited list but that didn't work the way I tried it. 

 

Anyone have a good solution that I'm not thinking of?

 

Also, on a separate note…. Has anyone found a good way to make sure that users don't open the same record at the same time to work on it.  There are three techs that will be using the system and they can all initially see the same records in a cfgrid.  When one opens a record we don't want someone else to be able to open that same record.  My current thought is to have a field in the record that is a time stamp that would be added when the person opens up the detail form page.  Then if someone tried to open that record in the detail page within a certain time frame, they would see a lock and the user that has it locked by querying that date and doing a dateDiff to see if it was within a certain time frame.  Has anyone done something that would be a little more effective?

 

Thanks,

Tim

Tim Starling
Project Manager Web
Global Aid Network

A ministry of Campus Crusade for Christ International
972-234-0800, extension 1335
www.gainusa.org

 


This e-mail message has been scanned for Viruses and Content and cleared by MailMarshal - For more information please visit www.marshalsoftware.com



This e-mail message has been scanned for Viruses and Content and cleared by MailMarshal - For more information please visit www.marshalsoftware.com

_______________________________________________
Reply to DFWCFUG:
 [email protected]
Subscribe/Unsubscribe:
 http://lists1.safesecureweb.com/mailman/listinfo/list
List Archives:
    http://www.mail-archive.com/list%40list.dfwcfug.org/
  http://www.mail-archive.com/list%40dfwcfug.org/
DFWCFUG Sponsors:
 www.HostMySite.com
  www.teksystems.com/





--
Mike Kelp

--Education's purpose is to replace an empty mind with an open one.
~Malcolm S. Forbes
--If knowledge is power, know this is tyranny.
~Thrice
_______________________________________________
Reply to DFWCFUG: 
  [email protected]
Subscribe/Unsubscribe: 
  http://lists1.safesecureweb.com/mailman/listinfo/list
List Archives: 
    http://www.mail-archive.com/list%40list.dfwcfug.org/             
  http://www.mail-archive.com/list%40dfwcfug.org/
DFWCFUG Sponsors: 
  www.HostMySite.com 
  www.teksystems.com/

Reply via email to