Das Notes Forum

Domino 9 und frühere Versionen => ND6: Entwicklung => Thema gestartet von: Toma Bogdan am 18.06.04 - 15:49:30

Titel: Problem with Listbox fields in layout
Beitrag von: Toma Bogdan am 18.06.04 - 15:49:30
I need to refresh automatically a field based on another field (listbox). Both fields are in a  layout region. How can I do that ?

10x
Titel: Re:Problem with Listbox fields in layout
Beitrag von: koehlerbv am 18.06.04 - 22:46:23
Hi, Toma,

you need to set your "another field" to "update fields after field update" (second tab on the field's properties - I've just now no english designer client installed). This works even in a layout region.

HTH,

Bernhard

PS: Are you from Romania ? The very best collegues I ever worked with (until now ;-) came from Timisoara. I hope that we'd find a new common project in the very next time ;-)
Titel: Re:Problem with Listbox fields in layout
Beitrag von: TMC am 18.06.04 - 22:55:37
I've just now no english designer client installed).

Here is the original R5 english client checkbox name  ;)
"Refresh fields on keyword change"

Matthias
Titel: Re:Problem with Listbox fields in layout
Beitrag von: Toma Bogdan am 19.06.04 - 15:18:16
you need to set your "another field" to "update fields after field update" (second tab on the field's properties - I've just now no english designer client installed). This works even in a layout region.
Here is the original R5 english client checkbox name  ;)
"Refresh fields on keyword change"
I have forgot about this trick ....  unfortunately this not help me because my field (that I need to refresh it) isnt' computed based on a formula... anyway, 10x for your help.

PS: Are you from Romania ? The very best collegues I ever worked with (until now ;-) came from Timisoara. I hope that we'd find a new common project in the very next time ;-)
yeap.. I have from Romania ... more exactely from Timisoara  :D
you can see some pics from my town (http://bogdan.bycable.net/categories.php?cat_id=151) on my site (see the profile).

I hope that you will have many projects together with Romanian developers which are great guys ! Best regards from Timisoara !
Titel: Re:Problem with Listbox fields in layout
Beitrag von: Semeaphoros am 19.06.04 - 15:25:15
Well, if you want to get helped, you need to say us, how that field is updated instead of a formula. I'm sure, someone will come up with a solution.
Titel: Re:Problem with Listbox fields in layout
Beitrag von: koehlerbv am 20.06.04 - 00:55:12
As Jens already said: Just give us some more informations - I am sure we'll find a solution ;-)

That you are from Timisoara, too, lets me think again: We are living on a small planet  ;)

Bernhard
Titel: Re:Problem with Listbox fields in layout
Beitrag von: Toma Bogdan am 20.06.04 - 18:21:35
So, I have 2 fields:
- k_org (radio button)
- users_list (list box) with the Formula for choices (users)

I need to refresh automatically the content of the users_list field depends of the k_org value.
 
This is the code from the Refresh list button:
Code
Sub Click(Source As Button)
   Dim ws As New notesuiworkspace
   Dim uidoc As notesuidocument
   Dim doc As notesdocument
   Dim popup As notesdocument
   Dim s As New NotesSession
   
   Dim index As Integer
   
   Set uidoc=ws.currentdocument
   Set doc=ws.currentdocument.document
   
   Dim dbcrt As NotesDatabase   
   Set dbcrt=s.currentdatabase
   
   path$=dbcrt.FilePath
   final_path$ = Leftbp$(path$, Len(path$)-12)
   
   Set db=New notesdatabase (dbcrt.server,final_path$ + "users.nsf")   
   
   Dim temp As Variant
   
   org=doc.k_org(0)
   
   Set v=db.getview("(All"+Left (org$,2)+")")
   
   Set user_doc=v.getfirstdocument
   index=0
   
   While Not user_doc Is Nothing
      Redim Preserve strArray(index) As String
      strArray(index)=user_doc.name(0)
      index=index+1
      Set user_doc=v.getnextdocument(user_doc)
   Wend
   
   doc.users_list=strArray
   Call uidoc.refresh
   
End Sub

That you are from Timisoara, too, lets me think again: We are living on a small planet  ;)
you have right  ;D
Titel: Re:Problem with Listbox fields in layout
Beitrag von: TMC am 20.06.04 - 18:35:28
Toma,

I just galloped through your code, but I'm not sure what you need exactly.....

OK, you do have 2 fields and a button.

Zitat
I need to refresh automatically the content of the users_list field depends of the k_org value.
Does this mean, if the user clicks on the radiobutton, then the above mentioned code (sub click...) should be executed?

If so, maybe you could use the postrecalc-event!? Or the exiting-event of the radiobutton-field (not that perfect).

Titel: Re:Problem with Listbox fields in layout
Beitrag von: Toma Bogdan am 21.06.04 - 14:51:27
Zitat
I need to refresh automatically the content of the users_list field depends of the k_org value.
Does this mean, if the user clicks on the radiobutton, then the above mentioned code (sub click...) should be executed?

If so, maybe you could use the postrecalc-event!? Or the exiting-event of the radiobutton-field (not that perfect).
when I select item3, the form refresh the list for the last item accesed (item2); if I select item4, the form refresh the list for item3 and so on even I use postrecalc-event or the exiting-event ...  ???