Solved

Passing URL Parameters to Forms within Notes Client

Posted on 2011-02-17
10
2,029 Views
Last Modified: 2013-12-18
Hi

Quick question:

Is it possible to pass parameters to a form via a notes url that will open the form in the notes client ie:  

notes://server/db.nsf/form?openform&type=Sales

If so, how can I accomplish this?
0
Comment
Question by:Bristan_Service_Desk
[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
  • 5
  • 4
10 Comments
 
LVL 22

Expert Comment

by:mbonaci
ID: 34915135
No, I don't think so. At least not with notes://  url.
I don't know where you're sending the URL from, but maybe you can use some kind of indirect way of passing the param, like setting environment variable and then reading it from your form, or something similar...
0
 

Author Comment

by:Bristan_Service_Desk
ID: 34915166
Hmmph......what about using a http url to call an agent and passing the parameters to the agent?  If that's possible I could create the document within the agent......but would still need to get it to open in the client somehow....
0
 
LVL 22

Expert Comment

by:mbonaci
ID: 34915337
You can get the arguments by parsing the Query_String item in the document returned by agent property DocumentContext (or method getDocumentContext if you use Java).
Query_String item contains the entire URL command that started the agent.

DocumentContext:
http://publib.boulder.ibm.com/infocenter/domhelp/v8r0/topic/com.ibm.designer.domino.main.doc/H_DOCUMENTCONTEXT_PROPERTY.html

Web agents:
http://publib.boulder.ibm.com/infocenter/domhelp/v8r0/topic/com.ibm.designer.domino.main.doc/H_LOTUSSCRIPT_AND_JAVA_AGENTS_WEB.html

See Example 6 here:
http://publib.boulder.ibm.com/infocenter/domhelp/v8r0/topic/com.ibm.designer.domino.main.doc/H_EXAMPLES_LOTUSSCRIPT_AND_JAVA_AGENTS_WEB.html

Who/From where/How sends the URL?
If the client is the one that sends URL, there's no problem with creating new document in UI using an agent.
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!

 

Author Comment

by:Bristan_Service_Desk
ID: 34915419
The URL is to be called via our business system, IFS (windows app).  EAch screen has a right  click menu within the app and the URL will be called when selecting the option from the right click menu.  

This will pop open an IE window calling the URL and passing parameters pulled from the app.....and that's where I got stuck, as it's not a web document but is in the client I wasn't sure how to get the parameters into the document...
0
 
LVL 22

Expert Comment

by:mbonaci
ID: 34915843
So you cannot use web access, since the Lotus app is developed only for the Notes client, is that what you're saying?
Then simply use a file (or windows registry):

 - in your application, after the client chooses the option in the right click menu:
    - store params in a (e.g. csv, ini, txt) file (or registry) that you'll create somewhere on your file system
    - send notes:// URL

 - in Lotus form:
    - in the form's PostOpen event, use LotusScript to read the params from the .csv file (or registry) and use them where needed

It's easier to read environment (Notes.ini file) from LotusScript, but you don't want to alter the notes.ini from outside Lotus.
0
 

Author Comment

by:Bristan_Service_Desk
ID: 34916070
I don't think storing the parameters outside of Notes is an option as the right clicks within the windows app are very limited (ie they can only create a new window inside the app, launch a URL or execute a SQL query).  Also the clicks can only run one command from the click (ie I can't store parameters AND launch a URL).

I'm thinking I may have to redevelop this to be a web enabled app to get it to do what the user wants.....
0
 
LVL 22

Expert Comment

by:mbonaci
ID: 34934356
Maybe you can create a table in your db, then, after the client chooses the option in the right click menu, use SQL to fill it with params.
Then use @DbCommand (ODBC) formula (e.g. from a computed field on your Lotus form) to retrieve those values from the db using an SQL query.

How to use @DbCommand:
    http://publib.boulder.ibm.com/infocenter/domhelp/v8r0/topic/com.ibm.designer.domino.main.doc/H_DBCOMMAND_ODBC.html

@DbCommand usage example:
    http://publib.boulder.ibm.com/infocenter/domhelp/v8r0/topic/com.ibm.designer.domino.main.doc/H_EXAMPLES_DBCOMMAND_ODBC.html
0
 

Expert Comment

by:Inforte
ID: 35390256
I just something similar. What I did was to create an email from web and then open it in the Notes client in editmode. This requires the document to be saved before opened. Would this work for you? In brief:
-Pass arguments to a page: http://localhost/2011.nsf/XMLHTTP-test?OpenPage&subject=test subject&sdid1=SD104522&email1=tosomeone@inforte.no
-Parse arguments with javascript and send them with a XMLHTTP request to an agent.
-Agent create and save document and send an Notes URL back.
-The page receive this Notes URL and post it with javascript to the browser. If you have Notes it will open.
0
 

Accepted Solution

by:
Bristan_Service_Desk earned 0 total points
ID: 35698653
Hi guys,

I managed to do what I needed without having to pass any parameters in the end...
0
 

Author Closing Comment

by:Bristan_Service_Desk
ID: 35726851
Found other ways...
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
Creating a new theme in discussion8.ntf 6 174
Lotus Notes 8.5 1 163
I need to install a client Lotus Domino in MAC BOOK AIR 4 95
Lotus Notes shared mailbox 'Sent by' in header 3 127
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
Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

726 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