Select the search type
  • Site
  • Web
Search
You are here:  Support/Forums
Support

Bring2mind Forums

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 05/16/2006 3:08 PM by  Dan Peerenboom
Autopopulate DMX when file system changes
 4 Replies
Sort:
You are not authorized to post a reply.
Author Messages
Dan Peerenboom
New Member
New Member
Posts:14


--
05/15/2006 5:53 PM

    I am wondering if it is possible for DMX to run a script that will automatically update itself after a different script moves files in/out of the file system. Here's the scenario:

    Our files get added by 1) someone using Outlook to upload them, and 2) a script runs nightly to move/copy the files from Outlook to a file server.

    We want those files to be reflected in DMX, but we do not want to have to load them into DMX and the Index Server catalog as well.

    Since we don't want to duplicate our efforts at uploading them (Outlook + DMX), I would like to know if another script can be created that will scan the file server (a particular directory for instance) and update DMX and Index Server automatically. My guess is there might be a problem with metadata not being populated.

    Thanks,

    Dan

    Peter Donker
    Veteran Member
    Veteran Member
    Posts:4536


    --
    05/15/2006 10:40 PM
    Dan,
    Right. You need to add the metadata to the database. This will require more than just a setting.
    Kind regards,
    Peter
    Dan Peerenboom
    New Member
    New Member
    Posts:14


    --
    05/15/2006 10:57 PM
    Peter,

    Thanks for your quick reply.

    Is it still fairly easy to write a script (using T-SQL?) to scan a directory and if a new file exists that isn't in the DMX/Index Server have DMX updated by inserting a new record with the filename (and whatever else), and use some generic info to populate the metadata fields (or use null or empty strings for metadata)?

    If we can do this without being "required" to include metadata, that would be fine, even though we know we cannot return search results for those documents whenever we use the metadata search fields.

    Assuming the script is not too difficult, how might this come about? I assume there isn't an API for DMX that would allow us to do the coding.

    Thanks,
    Dan
    Peter Donker
    Veteran Member
    Veteran Member
    Posts:4536


    --
    05/16/2006 9:15 AM
    Dan,
    The DMX module follows standard DNN coding practice so it is not too hard to figure out the business logic class if you want to code against it. Alternatively you can do it straight in SQL as well of course. What you need to do is to add a record to DMX_Entries. Most of the fields are self-explanatory. Some tips though: the 'Entry' field points to the file. The contents of this field are added to the 'repository location' to find the file. That means that the file has to be copied to the repository for you to be able to get this working. Set roles correctly in ViewRoles and EditRoles. Make sure LastVersionId is set to the newly generated EntryId and that CollectionId points to the EntryId of the collection you want it to appear.
    Peter
    Dan Peerenboom
    New Member
    New Member
    Posts:14


    --
    05/16/2006 3:08 PM
    Peter,

    Thanks for your answers and feedback. Much appreciated!

    Cheers,
    Dan
    You are not authorized to post a reply.