Solved

@Formula or @Command

Posted on 2001-08-20
15
249 Views
Last Modified: 2013-12-18
I created a hotspot that opens a view on a database on the Domino server.  I don't want to specify the server name and database path because we will eventually move the database in six months time.  So what I want to do is use an @Formula to look for the server and database path instead of specifying:  "Server name/OU/O":"Database path.nsf"  Is there such a command?
0
Comment
Question by:zdima
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 3
  • 2
  • +3
15 Comments
 
LVL 10

Expert Comment

by:zvonko
ID: 6408152
The function is: @DbName

First string returned by @DbName is server name, second string is the DB path on server.

But you do not need it. If you open your view with [OpenView] than it is allways the current DataBase.
============================
Example: OpenView  
This formula opens the Reverse Chronology view for the current database.
@Command([OpenView]; "Reverse Chronology")
============================

Wath command do you use?
0
 
LVL 4

Expert Comment

by:sloeber
ID: 6408853
zdima,
Why you don't use the replica ID ?
Then it's not necessary to use the server name and database name.
Then he looks all the server until he found the database.
If you want to move the datbase, you make a replica from the existing one and copy it to the new destination.
After that, you can delete the database from the old place

Greets,
Sloeber
0
 
LVL 8

Expert Comment

by:Jean Marie Geeraerts
ID: 6409499
If you want to make code portable, you don't hardcode anything. Surely not replica ID's, since this will also make your code very difficult to maintain. (Try updating design of a database that's full of hardcoded replica ID's, I can tell you it's a pain!)

I'd go with zvonko.
Use
   @command([OpenView];"Name of your view")
for opening a view in the current database.

To get the server name use :
  @Subset(@DbName;1)
For the database path use :
  @Subset(@DbName;-1)

If you're using it on the web, you need to translate the returned path to a URL, so you need to replace spaces and backslashes like this :
  @ReplaceSubstring(@Subset(@DbName;-1);" ":"\\";"+":"/")

This last thing just FYI, from your question I can't tell if you're using a client or browser for your application.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 9

Accepted Solution

by:
Arunkumar earned 50 total points
ID: 6421698
For this reasons i always have a parameter document that will always store the destination database server and dbname path.  I dont use @DBname or hardcoded values i just lookup this parameter document for the server and the dbname.

When you move the destination db from one server to another or change the name of it, you just edit the parameter document and your application continues working as it were previously.

Good Luck!
Arun
0
 
LVL 8

Expert Comment

by:Jean Marie Geeraerts
ID: 6427881
Sounds like a very good solution, Arun!
0
 
LVL 4

Expert Comment

by:sloeber
ID: 6427894
How do you solve your problem with replica's?
If a person is working home on a local replica, and the database need information from another db's ?

If I good understand, then you write down the settings manual in the parameter document.
So, the users must have access to all the servers.
But if he's working home, he doesn't have any connection to another server.
0
 
LVL 8

Expert Comment

by:Jean Marie Geeraerts
ID: 6427957
Read the question, sloeber.
He's opening a database on a particular server.
0
 
LVL 9

Expert Comment

by:Arunkumar
ID: 6431508
Thanks JM !
0
 
LVL 8

Expert Comment

by:Jean Marie Geeraerts
ID: 6431524
You're welcome ;-)
0
 
LVL 4

Expert Comment

by:sloeber
ID: 6431572
Yes, I know that.
But, I'm  just asking, how do solve your problem if you're working home or on a other server.
Else you must explain it to me.
Where I work, we have databases, who're used over 60 countries.
Then I must specify for each server(coutry) a seperate parameter document.
If you use replica ID's than he automatically search to the database.
0
 
LVL 8

Expert Comment

by:Jean Marie Geeraerts
ID: 6431587
Put the replica ID in the configuration document and your problem is solved. Simple...
0
 

Author Comment

by:zdima
ID: 6437801
Arun,
I'm just starting out and not as advanced as you guys are in Notes so I need your help.  I like the idea of using a parameter document.  How would I go about doing that and defining it in the design of a database?
Thanks!
zdima
0
 
LVL 8

Expert Comment

by:Jean Marie Geeraerts
ID: 6439373
All yours, Arun. I can explain too, but unfortunately don't have the time today.
0
 
LVL 63

Expert Comment

by:Zvonko
ID: 10476441
zdima,
No comment has been added lately (912 days), so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:

RECOMMENDATION: Award points to Arunkumar http:#6421698
Please leave any comments here within 4 days.

-- Please DO NOT accept this comment as an answer ! --

Thanks,

Zvonko
EE Cleanup Volunteer
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Send email and attachment (Lotus notes) 55 257
If no attachment, dont send email - lotus notes/vba 10 396
Lotus notes email code 13 100
Lotus Notes Calendar Issue 5 115
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…
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

733 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