?
Solved

@Formula or @Command

Posted on 2001-08-20
15
Medium Priority
?
254 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
Industry Leaders: 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 200 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

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…
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
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

771 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