Parker Software Ltd Homepage
Forum Home Forum Home > Email2DB Email Parser > General
  New Posts New Posts RSS Feed: Message UID
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Message UID

 Post Reply Post Reply
Author
Message Reverse Sort Order
Daniel View Drop Down
Admin Group
Admin Group
Avatar
Technical Director

Joined: 19 Dec 2006
Location: Stoke-on-Trent
Posts: 875
Post Options Post Options   Quote Daniel Quote  Post ReplyReply Direct Link To This Post Topic: Message UID
    Posted: 19 Jun 2012 at 9:37am
Hi
 
No - the MessageStore table is populated after the message is processed.  Before this it is inside the EdgeQueue table, but the MessageIDs here aren't related.
 
You could modify the messageid on the fly if you want to replace it with a GUID for instance.  You can do this in the script at any stage in the trigger process:
 
Email2DBMessage.MessageID = "Your New ID" '  this is a string field.
 
The only downside to this would be if you needed the Message ID to remain intact to prevent duplicate processing.   The original Message ID would still be available inside the email header.
 
 
Daniel Tallentire
Support
Parker Software
Back to Top
l33m4n View Drop Down
New User
New User


Joined: 24 Mar 2012
Location: Macclesfield
Posts: 9
Post Options Post Options   Quote l33m4n Quote  Post ReplyReply Direct Link To This Post Posted: 18 Jun 2012 at 10:27am
Hi again,

I have decided to use RecordNo as my unique message id in the autoresponse. I can't see it exposed as a built-in field so I am trying to populate it into a variable called using the Set Variable action.

Variable Name = RecordNo
Select RecordNo
from [Email2DBV3].[dbo].[MessageStore]
where UID = '%msg_messageid%'

ReturnField=RecordNo

I have tested the SQL command and it returns RecordNo if I use an existing UID value but it returns blank when the trigger fires. At what point does the MessageStore record get commited to the database? Is it before the trigger executes and if so should this value be available to populate into the RecordNo variable?

Thanks!
Back to Top
l33m4n View Drop Down
New User
New User


Joined: 24 Mar 2012
Location: Macclesfield
Posts: 9
Post Options Post Options   Quote l33m4n Quote  Post ReplyReply Direct Link To This Post Posted: 15 Jun 2012 at 9:30am
Hi James,

Can I add a new column to the MessageStore table in the database that is a new Guid (uniqueidentifier) and use this as a variable in my trigger? As an example, if I wanted to use the RecordNo identity which isn't available as a built in variable, how do I do that?

Thanks!
Back to Top
James Horton View Drop Down
Admin Group
Admin Group
Avatar
Technical Support

Joined: 01 Jun 2009
Location: Stoke-on-Trent
Posts: 277
Post Options Post Options   Quote James Horton Quote  Post ReplyReply Direct Link To This Post Posted: 14 Jun 2012 at 8:23pm
Hi l33m4n,

You should be able to create an Extracted Field within the Trigger that is set via an Extract Script. This can be any value you would like if this is any value you wish to assign to the message within a Trigger Actions.

This can be assigned to a Trigger Action by script using FIELDS_Value(" {field name} ") or within an Action's UI controls by using %field name% or dragging it across from the available fields.

Here is a link through to a UID creation script that we have within our samples - http://www.parker-software.com/forum/forum_posts.asp?TID=6115&title=custom-unique-id-field

Best Regards,

James Horton
Technical Analyst
Parker Software
Back to Top
l33m4n View Drop Down
New User
New User


Joined: 24 Mar 2012
Location: Macclesfield
Posts: 9
Post Options Post Options   Quote l33m4n Quote  Post ReplyReply Direct Link To This Post Posted: 14 Jun 2012 at 6:13pm
Hi,

I want to store a unique message ID against every message processed. I am collecting emails from multiple mailboxes so I can't use the Server Generated MessageID option (it would give duplicates). The problem is that the default UID is something like:- 

BCA79D1E51B2BD44AFE3EAE99E2791FF952FD82720 ORD1MBX06 mex04 mlsrvr com 20120614180218

which isn't very user friendly when included in auto-response emails and any further human interfacing workflow.

Is there any way I can control the format of the UID so that it's a more user-friendly value? The other option is that I use the RecordNo field but that's not a preferable option if I ever need to use replication..

Any ideas?
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.141 seconds.
These are the forums for Parker Software, developers of Live Chat Software: WhosOn and Email Automation Software: Email2DB.