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

asked on

Refreshing values on a field change in Lotus Notes 7.0.2.

I am creating a form for a user registration database. The user has to answer some questions on the type of user that is being registered that determines what fields are displayed. I do not want to show these fields to the user until the questions are answered. That way, the user cannot start filling items out until the registration type is fully determined.

These questions are a group of ComboBox's. On the last box, I have the following code in the OnChange event.

Sub Onchange(Source As Field)
      Dim ws As New NotesUIWorkspace
      Dim uidoc As NotesUIDocument
      Set uidoc = ws.CurrentDocument
      If uidoc.FieldGetText("Exempt") <> "" Then Call uidoc.FieldSetText("ShowInfo","1" ) Else Call uidoc.FieldSetText("ShowInfo","0" )
      Call uidoc.RefreshHideFormulas
End Sub

On this field, I have selected the option "Refresh Values On Keyword Change" selected and on the form, I selected "Automatically Refresh Fields" selected. The problem is that the event does not kick off, until I exit the field, even if I make a change.

Any ideas how to initiate this without exiting the field? The only one I can come up with is to have a button labeled "Continue" that forces the fields to refresh and checks to see if all screening questions are complete. If they are, then it makes the rest of the form visible.

Any help would be appreciated.
Avatar of Zvonko
Zvonko
Flag of North Macedonia image

Can you change it from ComboBox to DialogList?

I would normally use subforms, or possibly even frames, but that is really not the issue.

I think that a continue button is fine, since it will also give you an opportunity to check that the user data is properly checked, before going to the next stage.


I hope this helps !

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
Avatar of NormCox

ASKER

Thanks Bill. I have been knocking my head around for a while on this one. I never noticed that entry on the bottom of the advanced tab. Thanks a bunch.