03-12-2012 09:07 AM
I've got a situation that I was wondering if anyone has ever encountered and resolved. Right now, we've got a TRIM API-based program that runs nightly and queries the system and exports various documents out to a file location for viewing by company distributors. Right now the program is hard-coded to run specific searches, but we want it to be more flexible so that some of our users can better manage what gets searched and exported. I was thinking that this could be done by using .TR5 files. I have a user create a .TR5 file based on a saved search criteria, and I was thinking the program might be able to open the .TR5 file and use it to perform the search. Has anyone ever done anything like this before? I was thinking it was possible for the APIs to utilitze .TR5 files, but I can't find any info on it in the TRIM SDK. Would love assistance if anyone has dealt with things like this before.
03-12-2012 09:16 AM
you could replicate the same behavior in your code. Just open the TR5 and process the contents.
If it's a saved search the contents will include:
If the TR5 just contains records the contents will include:
03-12-2012 09:24 AM
Ah, so can the TRIM APIs access saved searches? Would it be easier to just have the program access a saved search as opposed to going the route of using a TR5 file middleman?
03-12-2012 09:28 AM
It would probably be easier for you if you added an additional field called "Distributor available" or something. Maybe use a thesaurus term instead? Your nightly routine would look for the anything with the additional field set or the thesaurus term, then export it. Then you don't have to deal with a complicate process for your users to get things exported.
I've done the same thing in the past and it worked well. The other option would to define an action called "Export", then your code just looks for anything with that action on it, and then exports it. With the action route you only ever have to deal with exporting it once.