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

Question

Question

Workflow Search Repository Activity and Variables

asked on September 14, 2017 Show version history

Hello,

I'm retrieving entries from the Repository using the Search Repository Activity and I want entries that start with a certain value.

Example: I want anything that starts with 12345

I have two values: 12345 and 1234567

I'm using the wildcad * to search anything that begins with the variable below, which is 12345, which should return 12345 and 1234567, but it does not return anything when I ran the Workflow.

{LF:name="%(ForEachEntryForeachxmlfilefound_CurrentEntry_Name)*", Type="D"}

If I do a "Test Search Query" and plug the number there directly, it works.

Any idea why?

Thank you,

Raul Gonzalez

0 0

Answer

SELECTED ANSWER
replied on September 15, 2017

I ran a sample with an XML file named A1234567, and PDF files named A1234567 (2) and A1234567 (3).

If I make the name in my search A12345*(*) it picks up both the PDF files but not the XML file.

Would this work for you?

1 0

Replies

replied on September 14, 2017

Have you confirmed that %(ForEachEntryForeachxmlfilefound_CurrentEntry_Name) has the expected value when this workflow ran?

0 0
replied on September 15, 2017

Yes, if I run it without the * it returns 12345. If I run it with the * it doesn't return anything.

0 0
replied on September 15, 2017

Can you post a shot of your search in the actual workflow?  Let us see what is around your workflow to make sure it is not a different activity causing the issue?

0 0
replied on September 15, 2017 Show version history

Sure. Notice in the branch there is an Add (2) token that I'm using to append a (2) into the original entry name so, this is what we have:

  • One XML in a repository folder with the name abcd
  • One PDF in the same folder with the name abcd (2)

the (2) was added automatically because there cannot be two files with the same name, even if it's a different extension.

When I do the search and simply append the (2) it gives me the result I want. 

Now to move forward I want to replace that and simply look for anything that contains abcd, so "abcd*" should return the one with the (2), right? but it does not return anything. I want to get rid of appending the (2) and using the wildcard because there could be a (3) (4) (45), who knows.

BranchXMLPDF.PNG
BranchXMLPDF.PNG (38.59 KB)
0 0
SELECTED ANSWER
replied on September 15, 2017

I ran a sample with an XML file named A1234567, and PDF files named A1234567 (2) and A1234567 (3).

If I make the name in my search A12345*(*) it picks up both the PDF files but not the XML file.

Would this work for you?

1 0
replied on September 15, 2017

Jennifer, yes that did the trick.

My Search Query no looks like this, which workes:

{LF:LookIn="%(Local Path)", Subfolders=n}&{LF:name="%(ForEachEntryForeachxmlfilefound_CurrentEntry_Name)*(*)", Type="D"}

Couldn't find anything similar in the attached manual. 

Thanks again Jennifer,

Raul Gonzalez

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

Sign in to reply to this post.