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

Question

Question

Search Repository Issue

asked on August 17, 2024

In the Windows client, I can search for 6" FLAT BAR-B-16 without issue in advanced search.

In my workflow I use the Token %(thisLoopMiscMetalNme) which would return the name of the item to use in the Search Repository activity. Unfortunately the quotation mark is causing a sytax error.

How can I replace that single quotation mark? Next question would be , how can I do this without affecting the remainder of the workflow?

I cant change the name of the item I am searching for . Corporate will not allow it.

This item is being pulled from forms, so Maybe there is something I can do there. A formula that would replace the quotation mark with a * would work. Ive tested that. Not all items have the quotation mark though..

0 0

Answer

APPROVED ANSWER SELECTED ANSWER
replied on August 19, 2024

There's a token function for that: EscapeSearchPhrase.

3 0
replied on August 19, 2024

Very cool. All these years and I'm still learning new things lol.

1 0
replied on August 29, 2024

Thanks!

0 0

Replies

replied on August 17, 2024

An easy workaround for me was to replace the " with a * in the  forms dropdown. If anyone has a better solution, let me know.

0 0
replied on August 19, 2024 Show version history

EDIT: See Miruna's answer instead.

On the workflow side, you could try using the Token Calculator function to replace values; this outputs to a new token so you can use the modified value without having to change it for the entire process.

It's possible the syntax error could be related to the quotation mark not being escaped, and if that is the case it might work if you just use Substitute to add the escape backslash.

SUBSTITUTE(%(Token),"""","\""")

In the example above, there are 4 double quotes total for each because this is how you indicate the double quote inside another double quote.

As a result, this is telling the token calculator to replace " with \" which might be all that is needed to escape the quote and avoid the syntax error.

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

Sign in to reply to this post.