Solved

@Formula or @Command

Posted on 2001-08-20
15
248 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
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.

 
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

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
Email Message Background Color 4 130
Invoke VBA from lotusscript after mailmerge 11 236
Why the url within notes is no action 6 48
Code for extraction to mkdir folder 5 59
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
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.

808 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