Link to home
Start Free TrialLog in
Avatar of NormCox
NormCoxFlag for United States of America

asked on

Hiding Blocks of Data in Lotus Notes

I have a form that will be used for User Registration. I need the creator of the form to answer a series fo questions to determine what type of registration is requested. Since what items are available, I don't want to show the main part of the form until the dialog is complete. So, I want to hide a big block of items until this is complete. The problem is that there are hide whens through out the form, so I would like to block the text somehow. I would like this for simplicity sake.
I have a form that will be used for User Registration. I need the creator of the form to answer a series of questions to determine what type of registration is requested. Since this determines what items are available, I don't want to show the main part of the form until the dialog is complete. So, I want to hide a big block of items until this is complete. The problem is that there are hide-whens through out the form, so I would like to block the text somehow. I would like this for simplicity sake and for ease of future maintenance.

I tried to do this with a computed subform, however, the subform is computed only on the form open event.

I tried to put the block in a section. In a regular section, if I hid the section, only the title of the section was not displayed. Everything else was. In a controlled section, I kept getting the error invalid data type from the formula tab of the Section Properties. Also, I had issues with commands to expand and collapse the section.

A table does not have a hide when for the whole dataabase.

Hopefully I have explained the issue well enough.

Does anyone else have any bright ideas?

As always, any help would be appreciated.


I tried to do this with a computed subform, however, the subform is computed only on the open.

I tried to put the block in a section. In a regular section, if I hid the section, only the title of the section was not displayed. Everything else was. In a controlled section, I kept getting the error invalid data type from the formula tab of the Section Properties.

A table does not have a hide when for the whole dataabase.

Hopefully I have explained the issue well enough.

As always, any help would be appreciated.
Avatar of Bill-Hanson
Bill-Hanson
Flag of United States of America image

Sometimes I split my forms up into several smaller forms, then use ViewSwitchForm to display the next set of fields to the user.
Avatar of qwaletee
qwaletee

The subform is not a bad idea, alll you have to do is close and reopen at teh end of the initial set of questions.

You could also try a slighty different approach to creating the new document.  Instead of having the user open the form directly, an agent could display dialog boxes that ask the initial questions, then opena  new doc with those fields already filled in. (A variation on the same technique is for the form itself to display the dialog box(es) from the QueryOpen event.)
Avatar of NormCox

ASKER

I like the ViewSwitchForm idea. I tried it but ran into issues. I have a button with only this line:

@Command([ViewSwitchForm];"M1051MDetails")

And M1051MDetails does exist. I received an error "Document Command Is Not Available" and nothing happens.

I then tried the same button with:

@Command([SwithcForm];"M1051MDetails")

I got the error "No document in that direction". I searched on the Notes knowledge db and found this item.

http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/a8b84c5037a8d5c285256ef60077fe78?OpenDocument

Have you seen anything similar?

I will work on trying the subform answer.

Thanks for both of your inputs.

ASKER CERTIFIED SOLUTION
Avatar of Bill-Hanson
Bill-Hanson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You cna't switch form until aftert he first time a doc is saved.
Avatar of NormCox

ASKER

So you don't need to follow the link, below is the code I ended up using in a button. ShowInfo is simply a flag that I set to one if everything is entered. Once again, an @Command did not run as described. It is more than likely user error on my part. Whatever the reason, this took care of the problem.

Sub Click(Source As Button)
      Dim ws As New NotesUIWorkspace
      Dim uidoc As NotesUIDocument
      Dim doc As NotesDocument
      Dim v As Variant
      
      Set uidoc = ws.CurrentDocument
      Set doc = uidoc.Document
      If uidoc.FieldGetText("ShowInfo") = "1" Then
            Call uidoc.Save()
            Call uidoc.FieldSetText("SaveDoc", "1")
            f$ = uidoc.FieldGetText("Form")
            Call uidoc.FieldSetText("BackTo", f$)
            Call uidoc.FieldSetText("Form", "M1051MDetails")
            Call uidoc.FieldSetText("HideContinue", "1")
            Call uidoc.Save()
            Call uidoc.Close()
            Set uidoc = ws.EditDocument(True, doc)
      Else
            v = ws.Prompt(PROMPT_OK, "Warning","You must complete the request information before continuing.")
      End If
End Sub