Embedded view question

I have a form with an embedded view in it. Above this embedded view I have created 2 buttons: the first button to create a new doc in this embedded view (this works) and the second button to edit a doc in this embedded view.

What kind of a formula or code do I have to use in this second button to be able to edit the doc that I have chosen in the embedded view?

If I just place the standard formula @Command([EditDocument]) in the button then Notes will place the current main document in edit mode and not the one I have chosen in the embedded view. How can I place the focus on the doc in the embedded view?

I need to place these 2 button in the same form as the embedded view because I need to place some additional code behind these buttons to keep a logging of the actions performed on this main doc.

Can you help me out?

Subject: embedded view question

Welcome to Notes 6 – use actions on your embedded view. It’s all a matter of focus. When you click a button on your form, focus is on the form, not the view. When you use an embedded view action, focus remains on the view.