You are viewing limited content. For full access, please sign in.

Question

Question

SDK file extensions through workflow

asked on June 12, 2014

 Is there a way to obtain file extensions through Workflow running a script for documents within Laserfiche. If so could anyone help out with this?

 

1 0

Answer

SELECTED ANSWER
replied on June 20, 2014

That should be fine. Are you running Find Entry just to get the entry's extension? If that's the case, you could just get rid of the Find Entry activity and wrap your script in a Conditional Sequence with a condition of the entry's extension. WF will handle getting the extension for you.

3 0

Replies

replied on June 12, 2014

I'm not sure of the exact extent of what you're trying to accomplish, but as of Workflow 9.1 the ability has been added to retrieve various document properties (including document extension) without the need for scripting.

 

From a Find Entry, Find Entries, or Search Repository activity, click on the Additional Properties pane to bring up the following menu.

 

 

This will allow you to select various properties to return as tokens when finding documents.

 

0 0
replied on June 12, 2014

What I have going on right now is I have a sdk script that generates pages. I want it to only run for PDF file types since there are issues with Microsoft documents. I want it to be for the entire repository as well hence why I want to check for the file extension. So since this will be on the fly I would need to check the files extension within the script.

0 0
replied on June 12, 2014 Show version history

To check the type of the e-doc in an SDK script, use the DocumentInfo's MimeType property. For PDF documents, the MIME type should be "application/pdf".

0 0
replied on June 20, 2014

So if I were to mix what Aaron stated with what you stated Matthew would that work in comparing the file extension. Would I then do:

if(GetTokenValue("FindEntry_OutputEntry_MIMEType")=="application/pdf")

I'm not sure if the syntax is correct or not.

0 0
SELECTED ANSWER
replied on June 20, 2014

That should be fine. Are you running Find Entry just to get the entry's extension? If that's the case, you could just get rid of the Find Entry activity and wrap your script in a Conditional Sequence with a condition of the entry's extension. WF will handle getting the extension for you.

3 0
You are not allowed to follow up in this post.

Sign in to reply to this post.