Autorefresh fields. Passing values with script library

Dear All, i am a newbie with Lotus Doino and i want your help.

I have 2 forms.1 is for user input errors and the other is for inserting projects. When the user select the project from the formm automatically 4 others fields inside the forms are updated.My problem is that when i change any field from the project form and after that a users opens a error document he dont see the fields with the new values but with old.To see them needs to edit the document and save it.

Can anyone help me how can the documents updated without the user edit the document. I think maybe need to write a agent form that.

here is my test Script Library agent (but doesnt work for all fields.Only for one)

Sub SetPprojectValue ( tmpPrjOLD, tmpPrjNEW As String)

Dim Session As New NotesSession

Dim Workspace As New NotesUIWorkspace	



Set session = New NotesSession

Set db = Session.CurrentDatabase





Set MainView = db.GetView("ALLENT")



'Search by old value

Set MainVC = MainView.GetAllEntriesByKey(tmpPrjOLD,False)



If MainVC.count >0 Then				

	

	Set MainEntry = MainVC.Getfirstentry()

	

	Do Until MainEntry Is Nothing

		

		Set MainDoc = MainEntry.document

		

		' Set New Value

		MainDoc.Project_Main = tmpPrjNEW

		'MainDoc.tmp_status =  tmpStatus

		'MainDoc.tmp_Cycle =  tmpCycle

		'MainDoc.tmp_Run =  tmpRun

		'MainDoc.tmp_SystemF =  tmpSystemF

		

		Call MainDoc.save(True,True)

		

		Set MainEntry = MainVC.GetNextEntry(MainEntry)

	Loop		

	Call  Workspace.ViewRefresh

End If

End Sub

with new script when i update the field project at the 1st form, automatically the field project_main updated at the 2nd form. How can i add the other fields?. I add them as comments.

At the main form i add: Call SetPprojectValue(tmpProject_Old, tmpProject_New)

Many Thanks and sorry for the huge mail.

Subject: RE: DbColumn Refresh.Help Me!!!

maybe the solution is simplier than you think.try to set on field properties box, second tab, the checkbox

  • refresh fields on keyword change.

Subject: RE: DbColumn Refresh.Help Me!!!

The master field is Dialog List with DbColumn option and all refresh are checked, the fields that are updated automatically are text and also have DbColumn option…

Thanks for your reply

Subject: RE: DbColumn Refresh.Help Me!!!

Ok.So try to put this line in your code after saving …

Call Maindoc.Refresh

Subject: RE: DbColumn Refresh.Help Me!!!

Many thanks for your reply but after doing that appears an error while i change a field and save it.

Illegal use of property.

Any suggestions?

Thanks in advance

Subject: Autorefresh fields. Passing values with script library

Can anyone please help me?