Refresh Embedded View

Hi ,

The requirement in the app am working on is to change the first sorting column based on a users action (clicking on a hotspot). I have done this by using Removecolumn and createcolumn. However unless i select the embedded view in the open notes document and press shift+F9 the views first columns change does not refresh.

I tried sendKeys but since the embedded view needs to be selected for it to work , its not the best way.

Advance thanks for any guidance.

Thanks

Monisha

Subject: Refresh Embedded View

I had similar problem once and i got help from the forum.I had to simulate the F9 key in the agent it self by calling the dll function

Probably this might help you:

You paste this function in ithe postsave of the agent

Use the following declarion

Declare Sub keybd_event Lib “user32.dll” (Byval bVk As Integer, Byval bScan As Integer, Byval dwFlags As Integer,Byval dwExtraInfo As Integer)

and then the following two lines wherever u want to refresh the embedded view(postsave of the agent probably)

keybd_event &h78,0,0,0 ’ key down - to refresh view

keybd_event &h78,0,2,0 ’ key up

Hope this helps.

Subject: RE: Refresh Embedded View

Thanks Manu, but the embedded view i need to refresh is in notes document open in the workspace. The user needs to clicks a hotspot and the views first column changes(which works) but it should refresh in the UI also. I tried shift+F9 using PressKey of win32 API, but unless i select the view in the open document and then press shift+f9 it does not refresh.

Seems hopeless ?

Any help would be great!

Monisha

Subject: RE: Refresh Embedded View

why dont you define the current uidoc in the agent and the after you have updated the view in the agent at the end call uidoc.refresh.this probably might work.

Manu

Subject: RE: Refresh Embedded View

yeah possible …but i have tried something else and it seems to work.Set an environment variable for each hotspot , use this to calculate the view for the embedded view formula. (I created 6 diff views as each view will only show a max of 20 docs).

Another option suggested to me was use of embedded editor (u can embed a form in a form) give anonymous access to the embedded form and manipulate)!

Thanks for your time

Monisha

Subject: Thanks a lot, this one worked for me!