Author Topic: Is there a 'Get Last Modified Date' function?  (Read 6335 times)

chammersley

  • Member
  • *
  • Posts: 10
Is there a 'Get Last Modified Date' function?
« on: March 26, 2010, 01:55:50 PM »
I'm looking to query an Outlook record, using the OutlookID, and return the 'last modified time stamp'.

I tried using the PCEM_GetFieldData( Modified ) ; however, this first requires targeting the Record and the only method to do that is PCEM_OpenRecord.... which updates the time stamp in Modified.

Is there another function I have overlooked which will return the last modification time stamp for an Outlook Id?

Many thanks!
Colleen

Melinda DePalma

  • Member
  • *
  • Posts: 179
    • Productive Computing
Re: Is there a 'Get Last Modified Date' function?
« Reply #1 on: March 26, 2010, 04:05:44 PM »
You can use the PCEM_FilterByLastModified( Timestamp ) or PCEM_FilterByFilterString( FilterString ) functions instead. These functions will allow you to filter records without actually opening the records. Please see the Functions Guide found here: http://www.productivecomputing.com/docs/docs_library/Exchange_Manipulator/Functions_Guide_Outlook_Exchange_Manipulator.pdf for more information about using these functions.

The PCEM_FilterByLastModified function will most likely be easier and more practical to use in your below scenario. These are more advanced developer functions made for your development pleasure ...   ;)  !

chammersley

  • Member
  • *
  • Posts: 10
Re: Is there a 'Get Last Modified Date' function?
« Reply #2 on: April 07, 2010, 11:57:23 AM »
I attempted to use the FilterByFilterString function; and filter by the 'ID', however this resulted in an ERROR.

The 'ID' field is not listed in your Advanced Example file... is it supported?

Melinda DePalma

  • Member
  • *
  • Posts: 179
    • Productive Computing
Re: Is there a 'Get Last Modified Date' function?
« Reply #3 on: April 07, 2010, 04:51:21 PM »
Can you please provide a screen shot of your script using this function?

chammersley

  • Member
  • *
  • Posts: 10
Re: Is there a 'Get Last Modified Date' function?
« Reply #4 on: April 08, 2010, 11:46:45 AM »
Screen shoot attached; but the script is just:
Set Variable [$Test; Value: PCEM_OpenFolder( $$DefaultMailFolder )
Set Variable [$Test2; Value: PCEM_FilterByFilterString( "[ID] = '" & Outlook::OutlookID& "'" )
Show Custom Dialog [$Test2]

--> $Test returns 0

Chris

  • God
  • Member
  • *****
  • Posts: 83
Re: Is there a 'Get Last Modified Date' function?
« Reply #5 on: April 08, 2010, 04:42:58 PM »
The FilterByFilterString takes a filter string that must comply with the structure represented in the documentation listed on the following pages....
http://msdn.microsoft.com/en-us/library/aa220093(v=office.11).aspx
http://msdn.microsoft.com/en-us/library/aa210275(office.11).aspx

The "ID" field is not a valid fileld in the context of a filtering string.  Valid field names can be found in the links on this page...
http://msdn.microsoft.com/en-us/library/aa219388(v=office.11).aspx


Are you certain that the PCEM_OpenRecord is changing the modified timestamp?  I do not see any place in the source code for the plugin where this would happen.


Chris


Chris

  • God
  • Member
  • *****
  • Posts: 83
Re: Is there a 'Get Last Modified Date' function?
« Reply #6 on: April 08, 2010, 04:43:49 PM »
Also note, the EntryID is not a field that can be used in a filter string.

chammersley

  • Member
  • *
  • Posts: 10
Re: Is there a 'Get Last Modified Date' function?
« Reply #7 on: April 09, 2010, 06:04:21 AM »
Chris-

Thank you for your response regarding the FilterByFilterString. As ID is not a field that can be used in the filter string this approach won't work.

I need to determine 'which record was modified last; the FileMaker entry or the Outlook entry?' When I issue the PCEM_OpenRecord command immediately followed by PCEM_GetFieldData( Modified ) a timestamp is returned the value of which is the current date/time. Which indicates to me that the OpenRecord command is modifying the Outlook record.

Would you recommend another method for approaching this problem?

Thanks!
Colleen

Chris

  • God
  • Member
  • *****
  • Posts: 83
Re: Is there a 'Get Last Modified Date' function?
« Reply #8 on: May 18, 2010, 02:17:02 PM »
Just following up to our conversation and the fix we found.  In some instances early versions of the plug-in would alter the LastModified date when accessing records with the PCEM_OpenRecord command.  The latest version of the plug-in (which will be available for download  after 5/25/2010 ) has this problem fixed.