Solved

@Formula or @Command

Posted on 2001-08-20
15
247 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
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…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

920 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

16 Experts available now in Live!

Get 1:1 Help Now