Solved

@Formula or @Command

Posted on 2001-08-20
15
244 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
  • 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
 
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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
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 Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

707 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

20 Experts available now in Live!

Get 1:1 Help Now