[SOLVED, thanks!]Problem with embedded view in a dialog box AGAIN - view won't change

Hi everyone !

Here is my problem : i got a form, wich contains an embedded view, a field and 2 buttons. This form is openned in a dialog box. The embedded view display the view according to a formula, and i got a field in my form called “MyView”. When i click on a button, it changes the value of “MyView”, wich change the view displayed.

FIELD MyView := “(vwLookupSpecialisations)”;

@Command([ViewRefreshFields])

Problem is, at first the view is displayed OK. I click on a button, an the view change, and the text of “MyView” too. But the, nothing. From there, the view won’t change anymore. The text contained in the field “MyView” don’t change either.

I tried to split the code in the buttons, and let only the first line, and the put the @command in another button. The text in “MyView” change, and oviously the view doesn’t change as the refresh asn’t been done. Everything stop working after the first refresh.

So, probably it is the refresh that causes the problem. I tried refreshing in LotusScript using the code below :

            Dim ws As New NotesUIWorkspace

Dim current As NotesUIDocument

Set current = ws.CurrentDocument



current.Refresh

Got the same problem. I tried a couple other ways of refreshing, but i don’t remember them all…

[Editing Myself] I tried too to use the form outside the dialog box. It worked fine. But still, i really need that form to be displayed in a dialog box. [/Editing Myself]

So, anyone has a idea ?

Thanks for your time !

Emilie

See life in pink

Subject: Problem with embedded view in a dialog box AGAIN - view won’t change

OK, I haven’t read your past posting so these may have been suggested and I’ve never done anything like what you’re doing. I was surprised to read it worked the first time!

I believe your buttons are on the Form and not on the embedded view? I’m wondering if after you do the @command if the system loses the “selection focus” (not sure what the right term is) such that after that time it doesn’t to update the “form” vs doing the work on the “view.”

Like when you click on print on a form with an embedded view - you get the form and the visible part of the embedded view on the print out. However if you click on the view and then click print then you only print the view.

As I said, I was surprised it worked the first time. What I would have done - and you may have your reasons on why you don’t do this, was include BOTH embedded view on the form with hide when formulas. The buttons would change the value as you indicate and based on which button was clicked you’d see either embedded view 1 or embedded view 2.

Have you tried that?

Subject: RE: Problem with embedded view in a dialog box AGAIN - view won’t change

Wow, thanks for the fast response !

Well, you idea was great, i just tried it but I still need to refresh if i want the right view to be displayed, and again, it does’nt work.

I changed the refresh command for :

@Command([RefreshHideFormulas])

but still, the same old thing as usual…

And still, it works fine outside of the dialogbox…

Subject: RE: Problem with embedded view in a dialog box AGAIN - view won’t change

Got me curious now. I will give it a try in a bit (maybe tomorrow) as in the middle of some paying work that I shoudl be doing! :slight_smile:

Subject: RE: Problem with embedded view in a dialog box AGAIN - view won’t change

THAT’S UNBELIVABLE !

Yeah, i made it ! it works !!! *jump all around her office"

I found that article and that fun Squishee Order Form database :

http://interfacematters.com/2007/08/using-embedded-view-as-picklist.html

He uses a tabbed table to put is views, and the he uses the option “switch rows programmatically”. That way, no refresh, no bug, no hide when formula.

Thank for your help Stephen :slight_smile: Maybe you didn’t find the way to do it, but still it was great to feel a little less alone :slight_smile:

Émilie

LIFE IS PINK !!!

Subject: RE: Problem with embedded view in a dialog box AGAIN - view won’t change

Hadn’t had a chance to look at it, glad to see you found a solution. Don’t think I would have come up with that.

Subject: RE: Problem with embedded view in a dialog box AGAIN - view won’t change

Thanks a lot ! Even if you don’t find a miracle solution, i appreciate a lot your help.