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

Question

Question

An Unrecognized character was encountered [9085].

asked on May 10, 2018

Hi Guys,

 i am trying to search the LFclient through LF SDK code, below is my code

RepositoryRegistrationCollection repoRegColl = myServ.GetRepositories();

RepositoryRegistration myRepoReg = repoRegColl["IT"];

Session mySess = new Session();

 mySess.LogIn(myRepoReg);

  EntryInfo GEI = Entry.GetEntryInfo(listEntryIDs[0], mySess);

string ppath = GEI.Path;

string[] filesArray = ppath.Split(Path.DirectorySeparatorChar);

var target = "Ticket #";

 var results = Array.FindAll(filesArray, s => s.StartsWith(target));

 Search LFSearch = new Search(mySess);

string file = results[0].ToString();

LFSearch.Command = file;

  LFSearch.Run();

 

any help is appreciated.

Thank you

 

 

0 0

Answer

SELECTED ANSWER
replied on May 11, 2018

It looks like you are trying to run a text search.  The search syntax for a text search has parentheses () around the search terms.

You cannot just push the text into the command object without properly formatting it.

Try:

LFSearch.Command = '(' + file + ')';

 

0 0
replied on May 14, 2018

HI Bert,

 I have tried couple of formats. But finally

LFSearch.Command = ("{LF:Basic~=\"" + (searchParameters + "\"}")); 

passing it the above way worked for me.

Thanks

0 0

Replies

replied on May 10, 2018

Hi Sai,

What value does the "file" variable store?

0 0
replied on May 14, 2018

HI Marco,

It stores a string

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

Sign in to reply to this post.