Solved

creating replica

Posted on 2006-11-28
13
377 Views
Last Modified: 2013-12-18
Hi all,

I have created a LS and placed it behind a button to create a replica from a database on the server to users machine.
The button is placed in the email sent to all users. THIS BIT WORKS GREAT.

However, our users are not all connecting to the same sever, they are split into two server.
At the moment I have hard-coded the main server name in the script that creates the replica, how can I change it so that the replica is created from the mail server that the user belongs to.
For example, if my mail server is server1 and user2 mail server is server2 then I want to create my replica from server1 and I want user2 to create their replica from server2. Both server will have a replica of the database.

Also, is there a way in LS to bookmark the replica that the user creates on the bookmark within the same script(create replica script)?
i know that I can create a bookmark with @command([addbookmark;......]); but I need to use LS.

Thank you in advance.
Varvoura
 
0
Comment
Question by:varvoura
  • 5
  • 4
  • 3
  • +1
13 Comments
 
LVL 46

Accepted Solution

by:
Sjef Bosman earned 100 total points
ID: 18026643
1) The name of the person's mail server is in his/her User document in the N&A-book, in the field MailServer
2) Adding a bookmark using LS might be possible, see
    http://www.breakingpar.com/bkp/home.nsf/0/87256B280015193F87256EAD004F314C
0
 

Author Comment

by:varvoura
ID: 18026771
Thanks sjef, ur always prompt.

1)That bit I know,but the bit that i need to work out is to extract it with the least code possible.

2) I'll check this out and I am sure u'll hear from me if any problems.

0
 

Author Comment

by:varvoura
ID: 18026792
1) got it

dim dbname as NotesDatabase
Set dbname = New NotesDatabase( myservername, "names.nsf" )
set view = dbname.GetView("LookupbyFullName")
dim user as string
user = session.commonusername
set namedoc = view.getdocumentbykey(user)
dim strserver as string
strServer = namedoc.MailServer(0)

Then in the create replica where I need to hard code the server, I will just use the strServer variable.
Is this correct??

0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 18028113
1) Yes, I think so, but the proof of the coding is in the running, isn't it?
0
 
LVL 8

Assisted Solution

by:behenderson
behenderson earned 100 total points
ID: 18031307
Quicker possibility

Dim vServer as Variant

vServer = Evaluate( "@Subset(@MaildbName; 1)" )
strServer = vServer(0)
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 18032908
Ah, interesting, but would that not be the current user's current mail database? So if he runs in a location with a local mail setup, the server would be wrong? Just guessing...
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:varvoura
ID: 18033025
The script works great now with behenderson's idea. But looking at sjef last post, it looks like I may have a problem.
most of our users (laptops, etc..) have the server in their location document set up to local.

Just when I thought I had things under control!!

I'll see if I can go back to my first option.

Thanks guys
0
 
LVL 8

Expert Comment

by:behenderson
ID: 18033620
You are absolutely right and very polite about being right.  Both very good qualities.  Sorry varvoura.  Thanks sjef.
0
 
LVL 8

Expert Comment

by:behenderson
ID: 18033624
I'll have to read those damn yellowbooks some more.
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 18035126
Heh, I just had to find a flaw in your idea ;-)) Anyway, for the original code, I suppose the user needs access to (a replica of) the N&A-book. Do laptops have a local replica of the N&A-book?
0
 

Author Comment

by:varvoura
ID: 18035404
Ok, original code works great, obviously still testing while online.
users don't have a replica of names.nsf. I suppose the only other way is to send them a replica with this one, hopefully this way it will be fine

By the way sjef, thanks for the bookmark link, I have a look at the idea and written the code to bookmark the replica on the bookmark bar and it works like a charm.

....The luxury of trying to make things eaiser for everyone!

Thanks again

 
0
 
LVL 18

Assisted Solution

by:marilyng
marilyng earned 100 total points
ID: 18060194
Hi varvoura,

For laptop users, I generally create a condensed directory on the server, and replicate this down to them.  Then add the light directory filename to the list of address books in user preferences.

The condensed directory is basically the ($USERS) view, a list of all users and groups for addressing purposes and has 1/4 the size of the NAB.  Also, it is more secure and less server intensive when replicating.

See: Setting up a condensed Directory Catalog in Adminstration Help.

Regards!
0
 

Author Comment

by:varvoura
ID: 18061725
Thanks Maryling, its a great idea because we replicate nearly every database to mobile users.
However, what i did to get myself going with this one is asked the user to replicate using the button while they're online for this time, this way I didn't have to download a copy of the entire directory.

I will definitely set up the condensed directory catalog, it will save me a lot of hassle in future.

Thanks you all for your great help, every one of your idea came handy, much appreciated.

Varvoura
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

760 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

19 Experts available now in Live!

Get 1:1 Help Now