Odd "SendString" command Problem

Hello all, I have an odd question for you if you have time to ponder something and want to make your eyes cross.

We are using the “SendString” command to enter a computed search query string into the “Search in View” text field so a View Search is performed. The query string is created based upon the options a user selects from a form, used as a dialog.

To be honest it works really well and we have not had any problems with it, until now.

PROBLEM: For some reason, users from our Canadian branch appear to NOT have the query string automatically entered into the text field, if they are using a specific US Branch server copy.

 1) If they use the local Canadian server copy, it works.

 2) If they use a DIFFERENT US server copy it also seems to work.

 3) Oddly enough, the US people that use the Server Copy, that fails for Canadan users, DO NOT have any issues.

The Canadian Users have Notes 7, but we tested in both 6 and 7 and can’t seem to make it fail. When I run the code from their systems in debug mode, it appears to work. But once out of the Debuger it fails again.

I rebuilt the index and recompiled the code and nothing seems to fix it. Is there something I’m missing? Some kind of Server Permission possibly that could lock that down?

It smells like a timing issue of some kind, but that doesn’t make sense. I’d assume it would be slower across the network rather than using the local server copy which does work.

Any Ideas would be most appreciated.

I know one idea is to simply say “use a server that works” but they have qualms about replication issues and are worried they won’t have the latest info. Besides that, I don’t like having code that should work for everyone but doesn’t without knowing why it doesn’t work.

Here is the example code that seems to not fuction. The code previous to this was simply to get the docProfile, a back end user profile document, NOT a Profile Profile doc just a normal notes doc called a “profile”, that holds the query and selected options.

strQuery = docProfile.Query(0) ’ <===We get the Query String here, I added a print earlier to see what it got back and it passed back the data as expected, but failed at the next line…

SendString strQuery ’ <=== here is where we “type” the query into the field

PressKey VK_RETURN ’ <=== the “user” then presses return so the search is carried out.

Thanks for your time,

  • Nathan

Still no idea why this doesn’t work on this one server.

Subject: Odd “SendString” command Problem

I’m not familar with SendString (Just saw I need to read the next message to learn about it ) and given all the testing… I think I’m barking up the wrong tree (given it works on other boxes) but could the search string contain different regional settings you (or your server are) not expecting?

For example,

if they are in Quebec the decimal is: “,” and not “.” or

maybe it’s a date format problem yyyy/mm/dd vs the expected dd/mm/yyyy of the U.S.?

Subject: RE: Odd “SendString” command Problem

I wondered that too, but the string that gets created doesn’t really suffer from odd setting issues. Even if it did, I would assume that it would still “type” the data in and the search would have failed. I may be incorrect in this assumption but it still seems odd it only messes with one server. :stuck_out_tongue:

Subject: Odd “SendString” command Problem

Just adding a post to move this up. I still can’t figure out why this doesn’t work.

Subject: RE: Odd “SendString” command Problem

Read the thread following yours.You said it fails but you never said how it fails, what string you’re trying to send, whether you get an error message, etc. Did you debug into the function you’re calling to see more precisely where it fails?

Subject: RE: Odd “SendString” command Problem

Hi Andre, Thanks for your curiosity. Sorry I didn’t reply sooner. Been really busy and this fell off my radar.

The User doesn’t get any error message what happens is the string that I generate behind the scenes via the dialog does not get posted to the Search Bar. The string should have been posted when I called “SendString strQuery”.

I did debug the code and it created my search string without issue and I could see it in memory when I looked at the line just previous to the Send String Call, “strQuery = docProfile.Query(0)” strQuery was perfect, its almost like “SendString strQuery” didn’t run.

No error message and nothing to indicate something odd. Like I said though when I ran it in Debug mode on their systems, it DID function. When when I don’t use Debug, it doesn’t function / post / work.

It’s just very odd.