How to move focus from embedded view to doc

I think I know the answer to this but thought I toss it out just in case…

Short version - Client only (not web). Once the focus is set on an embedded single category view, is there any way to programmatically force Notes to revert the focus to the document containing the embedded view?

Longer version:

Docs are ‘read only’ (procedures) so users typically open the first doc in a series of related docs and just use to read down through the stack.

On a subset of docs, the users need to switch over to a specific editable doc and collect some data. Currently, I use a button that automagically whisks them from the directions to the data doc and another to bring 'em back to the directions.

Works great but I’m playing around with embedded views - prettier and kind of more intuitive.

Problem:

User lands on a page that requires they enter data.

They double click the doc in the embedded view, focus shifts to the embedded view and then off to the linked doc (all good so far).

They enter data, hit and land back on the original procedure doc - still focused on the embedded view. If they hit , they reload the data doc rather than moving to the next procedure doc as expected.

What I’d like is for the doc to change focus once the return from entering data so the sequence is:

Open doc.

Enter

Next doc

Enter

Next doc - needs data entry

Double click doc in embedded view

Enter data.

Back to original doc

Enter

Next doc.

What I’ve tried

Looks like the doc containing the embedded view just hangs onto focus on the embedded view once you click the view. There are no form events like ‘after getting focus’ so even if there was a way to change focus from the embedded view to the doc, there are no events that recognize the user has come back from somewhere else.

Searched all over here - questions relate to selecting docs in an embedded view rather than changing focus between docs and the views embedded in them.

Did I miss anything or am I reading this correctly - ya cahn’t get theyah from heah…?

TIA for any responses.

Doug

Subject: How to move focus from embedded view to doc

Hi Doug,

I hada similar problem trying to get categories in an embedded view to collapse on open and the only solution I found was to fake key strokes. To this end I figured out what key strokes were required to get the required action and then used sendkeys to fake the key strokes. dodgy at pbest.

However,

There are on click events and other events in the embedded view and form that fire off when you perform certain actions. something similar may work:

1 - When user is taken away from form , set an environ var. This lets number 4 / 5 below know what state it is in.

2 - User is returned to the embedded view form and presses enter.

3 - Catch the event triggered by the enter

4 If the environ var is there then

5 - Convert the event to change focus using uidoc or uiworkspace or what ever catches your fancy

Alternatively, when moving away from the form with the embedded view fire off a notes timers. The notes timer checks that the form you are on is not the same as the form you left.

When you return to the form you were on then the notes timer changes the focus and kills iteself. It is an untired idea in this context but has been used successfully in similar situations.

HTH,

Shane

Subject: RE: How to move focus from embedded view to doc

Shane,

I hadn’t thought about using env vars. Thanks. I’m going to test the design with a few folks and see if the focus issue causes problems. If it does, I’ll give the env thing a try.

Thanks for the reply, very much appreciated!

Doug

Subject: RE: How to move focus from embedded view to doc

Hi doug. did you ever get this to work? I’d be interested in your solution.

Subject: RE: How to move focus from embedded view to doc

Sorry, no. Priorities changed and that particular bit of code magic has dropped off my radar for the near term.

As it happens, I’m fighting a different embedded view/editor problem now…

The new stuff is cool and gee whizz but sometimes the old ‘form/view’ dull stuff just works.