I would like to updates like fields from one database to another, but only if the values in those fields do not match.
Is it possible to store the fields in a list that I can access and loop through this list in a simple if statement without hard coding the field names?
Subject: Field Update using External List
If you want to loop through all the fields in one document and compare them to another document you can use the doc.Items collection. In LotusScript you could do something like this:
Forall itm In doc1.Items
list1 = Join(itm.Values, “;”)
list2 = Join(doc2.GetItemValue(itm.Name), “;”)
If StrComp(list1, list2, 0) = False Then
'the two lists are not the same
Call doc2.ReplaceItemValue(itm.Name, itm.Values)
End If
That might not be completely syntactically correct, but it should give you an idea how it could be done.
HTH,
Charles
Subject: RE: Field Update using External List
I don’t want all fields in the form, just most of them. I thought I could loop through a list of the field names, but I’m not sure where I would house this list or how I would access it.