i want to update a field(1) on another form/view from field(2) which at first has the same values but should change accordingly if field(2) changes its value.
what is the code or formula to use??
i want to update a field(1) on another form/view from field(2) which at first has the same values but should change accordingly if field(2) changes its value.
what is the code or formula to use??
Subject: update field value according to another field
are documents related to each other? e.g. child/parent?
look at @setdcofield formula
or use getDocumentByKey of NotesView in lotusscript
Subject: RE: update field value according to another field
nope they are not related. however have the same values
Subject: RE: update field value according to another field
The easiest way to keep two fields in sync is to have just one copy, and have the other form look up the value of the field into a computed for display field using @DbLookup.
Drawbacks: since the field is not stored in one of the documents, you can’t use it in views of that document. Also, this hurts performance somewhat when opening/editing/saving since it takes more time to do a lookup than to just display the value stored in a field.
Would this work for you?
Subject: RE: update field value according to another field
Looks like this is not what he’s looking for.
Subject: RE: update field value according to another field
Geoffrey, if you post again the same question, and you don’t include the information you’ve supplied there, people aren’t going to know to go look for the previous thread to find out why you want to do this.
Incidentally, why do you want to do this? You didn’t really address why the solution I proposed wouldn’t work for you. You understand that Notes is working exactly as design here, right?
If you’re not sure what information to supply, the C R I S P Y document might help you.
Useful blog: Best Practice Makes Perfect
Subject: RE: update field value according to another field
Still trying to turn Notes into a relational database?
The fact that two different items (even if they happen to have the same name) in two different documents have the same value (by incidence) at any given point in time means nothing to Notes. If an item value in any one document changes and you want a set of documents to change accordingly, you have to write the code to find and update them.
This might be tedious and will certainly impact performance. In many cases, there are better solutions, if you choose to organize your data differently. You really have to stop thinking in tables and relations, it won’t get you anywhere in Notes.