We help IT Professionals succeed at work.

Hiding Blocks of Data in Lotus Notes

NormCox
NormCox asked
on
322 Views
Last Modified: 2013-12-18
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.
Comment
Watch Question

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

Commented:
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.)

Author

Commented:
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.

Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Commented:
You cna't switch form until aftert he first time a doc is saved.

Author

Commented:
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

Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.