Problem on Form using

I have a question on the Form using.

Since we have used 2 Form, one is contain more fields (Form More)and the others is contain less number of fields (Form Less). The purpose of using 2 form is made the opening time of the document more faster.

We have a button in the ‘Form Less’, which is used to close the existing opening ‘Form Less’ and open the ‘Form More’. Moreover, the form name stored inside the document is ‘Form More’.

That button is worked fine in R5 client. But it is not worked on R6 client. The following is the LotusScript for that button


Sub Click(Source As Button)

Dim thisWorkspace As New NotesUIWorkspace

Dim thisUIDoc As NotesUIDocument

Dim thisDoc As NotesDocument

'get current UIDoc

Set thisUIDoc = thisWorkspace.CurrentDocument

Set thisDoc = thisUIDoc.Document

'close UIDoc

thisUIDoc.Close

'open the origin document again with original form

Set thisUIDoc = thisWorkspace.EditDocument(False, thisDoc)

End Sub


Can anyone help me! I want to have a solution for coexistence stage.

Thanks a lot! :slight_smile:

Subject: Why not use @Command( [ViewSwitchForm] ; formName )?

Subject: RE: Why not use @Command( [ViewSwitchForm] ; formName )?

Bill,

Actually there has no different on using [ViewSwitchForm] and [SwitchForm] command in my case.

I would like to get fansy to speed up the performance because [SwitchForm] is switching the form immediately.

Thanks for your concern!

Dennis

Subject: You have lost me. Your original post showed you using LotusScript to close the window and re-open it with the Big form.

I asked why you did not just use the [ViewSwitchForm] @command inside the button instead. You replied with:Actually there has no different on using [ViewSwitchForm] and [SwitchForm] command in my case.

I would like to get fansy to speed up the performance because [SwitchForm] is switching the form immediately.

I saw nothing in your original post about using that.

Subject: Sorry for my misunderstanding! Please take a look to the message below.

I have already tested by using [ViewSwitchForm] and [SwitchForm] command. But this give me the same result.

The problem I find actually is that when you open a document from a view, which is using form formula. That document should be opened with the form provide inside form formula.

Now I have used this features to open a document with a more small simple form. But I have found no way to switch it back to a normal form. Even use LotusScript / formula / command.

On the other hand, I am still thinking is that can we open a document with other form without using form formula.

Regards,

Dennis Hung

Subject: Problem on Form using

What error are message are you getting?

I’ve seen this in 4.6+ when changes were made to Rtext fields and the document needed to be reopened, the fix was to dim a new UI document for the second open:

Dim thisnewUIDoc as NotesUIDocument

Set thisnewUIDoc = thisWorkspace.EditDocument(False, thisDoc)

Subject: RE: Problem on Form using

I have already tried this method and this method is still given me the same result!

My feeling is that R6 has cached the form loaded for this document. And I cannot do the close and reopen the document in 1 step to get its origin form.

Anyway, thanks for your concern!

B. regards,

Dennis Hung

Subject: RE: Problem on Form using

I’ve had another thought.

Are you using a view Form formula when you originally open the document? If so then I suspect that it is the View Form Formula that is taking precedence.

Subject: RE: Problem on Form using

I think the problem is in there too…

Because the form name has not been changed even the document is opened by using other form.

However, if I am not using the form formula. I cannot get fancy in open a document more faster by using a simple form.

So no idea on there!

Regards,

Dennis Hung

Subject: RE: Problem on Form using

Try using a single form but two different computed subforms. Use an INI or profile doc to store the required subform value or compute the appropriate subform based on the users roles.