Solved

Replication formula doesn't work

Posted on 1998-11-30
13
498 Views
Last Modified: 2013-12-18
I designed a Notes database in which I have a "Preferences" document for saving various user parameters e.g. a serial number which is incremented every time a document of a specific form is created. The Prefernces document is created and maintained internally using LotusScript. I am using the following replication formula for my database in order to protect the Prefernces document from being overwritten by the Preferences document of a replica:

SELECT Form != "Preferences"

The problem is that the Preferences document does get overwritten from time to time without being able to find out why my replication formula doesn't work.

Any suggestions? Please help!
0
Comment
Question by:marios
  • 4
  • 3
  • 2
  • +4
13 Comments
 

Author Comment

by:marios
Comment Utility
Adjusted points to 150
0
 
LVL 1

Expert Comment

by:bbangerter
Comment Utility
Do all replicas of the database contain the same replication formula?
Replication formulas do not replicate across databases.  So potentially you might have one replica of the database that contains the formula, and another one that does not.  Depending on which database the replication is being initiated from the replication formula could be different.
0
 
LVL 2

Expert Comment

by:ray_leach
Comment Utility
Does your form have an alias? Why not use the master slave principle and have the ACL in the master database not allow updates to the preferences form from other servers?
0
 
LVL 1

Expert Comment

by:rloomis
Comment Utility
Do you store form in document?  If  so, is the form name stored in $title rather than in form?  BTW, what you're doing sounds a lot like what the profile field was created for.  You might want to look at that feature.
0
 

Expert Comment

by:mkthakur
Comment Utility
Please try
SELECT !(Form = "Preferences")
if it doesn't work then try putting the same formula at every replica.
0
 

Author Comment

by:marios
Comment Utility
The Preferences document is created transparently with LotusScript. There is no form used to create it and no "Preferences" form exists, although my document has a field named "Form" which contains the value "Preferences".
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 

Expert Comment

by:mkthakur
Comment Utility
Did you actually try my suggestion? It should work even if it is a field.
Moreover when you create the document there is a property called Form also exists. So it should work.


0
 

Author Comment

by:marios
Comment Utility
I tried mkthakur's suggestion with no luck. I noticed that the Preferences document is overwritten when a new replica is created and the replication formula is NOT set BEFORE the documents start replicating. In other words, it seems that there is no problem when the replication formula is set in Replication Settings before the replica is initialized. Still, this doesn't make any sense since the original database on the server already has a replication formula, and therefore should not accept any documents with Form = "Preferences". Right? Or is it that once two documents are replicas of each other, then their changes are replicated regardless of the replication formulas? The problem is solved if the answer to the last question is "yes".
0
 

Expert Comment

by:mkthakur
Comment Utility
Could you please tell me the steps which you are doing more clearly and what do you intend to do.
0
 

Author Comment

by:marios
Comment Utility
I experimented with this to death, and finally concluded that the problem is because the replication formulas are not the same (as bbangerter said). Of course it's nice to know what is causing the problem, but this doesn't help me because I cannot force my users to set the correct replication formula every time they create a replica. Anyway, someone please reply to this question so that I can give you the points (most of them).
0
 
LVL 1

Expert Comment

by:ChrisD
Comment Utility
I am not a Notes developer so this may be a stupid question,
Would it be possible in LotusScript to save your preferences info into a local text file and look it up when required? - instead of referencing the information from within the DB? If you could automatically create this file (e.g prefs.txt)the file name would be the same for everybody but each would contain different info.
Alternatively - could you set up a lookup DB with a preferences document for each user ? - it could work out who they are from their ID file and lookup the corresponding document in the second DB ?

If all this is totally off the point, I apologize. Like I said, it's not my thing really -  but I am interested to know if this kind of stuff can be done with Notes. If it can't, then It's a bit basic I would think.
0
 
LVL 4

Accepted Solution

by:
stamp earned 200 total points
Comment Utility
Perhaps this helps you:

In the ACL define a role "DoNotReplicate".

In properties of "Preferences" form deselect under key symbol: "All readers and above"
and select "[DoNotReplicate]". Resave all documents you want to protect this way.

Give this role in the ACL only to those peoples and servers which do not replicate...
And this is the point. If you can not separate them, do not do the upper work.

Important note: you can not see any document without dedicated role.
Even not as manager!
0
 
LVL 1

Expert Comment

by:ChrisD
Comment Utility
instead of using the selectForm command - why not use ([Compose];"";"preferences")where "preferences is the basic form - have hidden fields in the form which are all computed ones so no user entry is required - this will add in all the info you need, include in the formula  save and close commands and it will be created in the DB invisibly to the user. Give it a hidden Author field with @Username and reference it when required.

0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now