• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1855
  • Last Modified:

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.
1 Solution
ZvonkoSystems architectCommented:
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 !

There's a trick to this one!  In addition to the settings you already have, you need to enable the "Run Exiting/OnChange events after value change" setting on the 3rd tab of the dependent field's properties.
NormCoxAuthor Commented:
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.

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now