What I am trying to do is provide dynamic folder and file names for my documents based on the template field data entered by the scanner operators.
The Substitution and Pattern Match tokens are cumbersome for me, so I tried using a Lookup token. My thought was that string manipulation would be easier using SQL. So I have built a query that looks into the Laserfiche database to retrieve the same information that is present in the Quick Fields session metadata. Here is part of the query, showing string maipulation:
select ltrim(
isnull( ord_nbr, '' ) +
isnull( ' ' + meeting_type, '' ) +
isnull( ' ' + doc_type, '' ) +
isnull( ' ' + meeting_date, '' ) ) file_name,
case
when doc_type in ('Agenda','Minutes','Council Orders','Resolution') then
'Council Records 166-200-135-5'
when doc_type = 'Agreement' then 'Agreements'
when doc_type = 'Election' then 'Elections'
when doc_type = 'Ordinance' then 'Ordinances'
when doc_type = 'Records Destruction Request' then 'Records Destruction Requests'
end folder
from ...
The query uses the "tocid" column as its parameter. The problem I am having is that the metadata does not seem to exist in the database once the Quick Fields session has begun to process the document. We typically set the post processing action to Delete. Is there a way to Lookup document metadata while keeping the post processing action set to Delete?