Save field in another view

hi i am actually new in notes and i got a little difficulty with the following.

i got a document (Doc1) which asks a group’s name and their total sales… Group, Sales

i want the save button of this document to also save the Sales value to another document (Doc2) which has the Member field. All members of the Group should have the same Sales value.

Any code snippet? Do i have to open Doc1’s view and open/edit all members of the group? Thanks!

Subject: save field in another view

Writing the Sales # in Doc 1 written to Doc 2 is fairly straight forward, the hard part is how you identify Doc 2.

For example, if you have Doc2’s ID you can use @ function @SetDocField

@SetDocField( DocID, “Sales”, Sales);

If you’re using Lotus Script you just need to:

doc2.Sales = doc1.Sales(0)