![]() |
Custom Unique ID Field - Event Date: 30 Jan 2006 - 30 Jan 2006 |
Post Reply
|
| Author | |
Stephen
Admin Group
Joined: 21 Oct 2005 Location: Stoke on Trent Posts: 1389 |
Post Options
Quote Reply
Calendar Event: Custom Unique ID FieldPosted: 30 Jan 2006 at 2:30pm |
|
You can create fields in Email2DB and assign them custom values using 'Extraction Scripts'.
This sample shows how you can create a custom ID field that will increment for each email processed. See: http://www.email-2-db.com/images/script-customidfield.gif Create a field in Email2DB. On the Extract Data tab click the Extract Script option and click the Edit button. Enter the script and save it. You can also use extraction scripts to alter values previously extracted from the email. The Email2DBExtract variable will contain the data extracted by Email2DB. You simple use the script to alter its value. |
|
![]() |
|
Daniel
Admin Group
Technical Director Joined: 19 Dec 2006 Location: Stoke-on-Trent Posts: 875 |
Post Options
Quote Reply
Posted: 01 Dec 2009 at 4:40pm |
|
Sub Main()
Dim LastID as Long LastID = GetRegistry("Variables","ID",0) LastID = LastID + 1 SetRegistry "Variables", "ID", LastID Email2DBExtract = LastID End Sub |
|
|
Daniel Tallentire
Support Parker Software |
|
![]() |
|
swhiteman
Expert
Joined: 13 Mar 2008 Location: NYNY Posts: 258 |
Post Options
Quote Reply
Posted: 01 May 2011 at 7:30pm |
|
Is there not a synchronization problem in this script?
You're not doing any locking before reading that Registry entry, so another script could get and write the same values. Or do all scripts actually only run in one thread?
|
|
![]() |
|
Stephen
Admin Group
Joined: 21 Oct 2005 Location: Stoke on Trent Posts: 1389 |
Post Options
Quote Reply
Posted: 02 May 2011 at 3:02pm |
|
Scripts run in one thread so there is no sync issue.
|
|
![]() |
|
swhiteman
Expert
Joined: 13 Mar 2008 Location: NYNY Posts: 258 |
Post Options
Quote Reply
Posted: 02 May 2011 at 7:39pm |
|
OK, are scripts the only things that block triggers? Is simultaneous processing capacity higher (no lock waits) if there are no scripts?
|
|
![]() |
|
Post Reply
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |