Solved

Replication formula doesn't work

Posted on 1998-11-30
13
500 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
ID: 1117695
Adjusted points to 150
0
 
LVL 1

Expert Comment

by:bbangerter
ID: 1117696
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
ID: 1117697
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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 
LVL 1

Expert Comment

by:rloomis
ID: 1117698
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
ID: 1117699
Please try
SELECT !(Form = "Preferences")
if it doesn't work then try putting the same formula at every replica.
0
 

Author Comment

by:marios
ID: 1117700
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
 

Expert Comment

by:mkthakur
ID: 1117701
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
ID: 1117702
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
ID: 1117703
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
ID: 1117704
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
ID: 1117705
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
ID: 1117706
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
ID: 1117707
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Lotus Notes to MS Exchange mailfile migration 4 52
Lotus notes email code 13 94
Domino Server 11 67
Unable to change external email address in Lotus Notes Mailbox 11 76
This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
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…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

776 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