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

Question

Question

How to search for a document using barcode in the repository and update the metadata value of the document.

asked on April 14, 2021

While designing a workflow we have a use case in which we want to search for a document using barcode in the repository and update the metadata value of the document.

We are using workflow SDK Script to achieve this. We have found a method that searches the documents but doesn't seem to work.

 

protected override void Execute()

        {

            using (Search search = new Search(session)){

               search.Command = "";

                search.Run();

 

                 //Get Search Results here

}}

from where i will get the session object in Execute method?

0 0

Replies

replied on April 15, 2021

Workflow's SDK Script has builtin connection that you can reference as "RASession".

0 0
replied on April 16, 2021

Thanks Miruna i am able to get the session. 

 

Can you please also help me further to search for a document in the repository. From examples i see we can use Search class

using (Search search = new Search(session)){

               search.Command = "";

                search.Run();

}

What is the syntax for creating search command? use case- i want to select document with a particular barcode and update its metadata

0 0
replied on April 16, 2021

I'm not sure what you mean by "select a document with particular barcode". Is that a template field in Laserfiche? If yes, you can use the search syntax to build your search criteria.

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

Sign in to reply to this post.