I am sending out an HTML email to our users every week in which I want to include links to certain documents and then a link to the overall database. The database is an Xpage db.
On my docs I have a field only visible to me in which I compute the link I need. The format is as follows:
notes://servername/__.nsf/0/?OpenDocument
What I want is the URL to open not just a specific document, but the Xpages app in general. Everything I try opens up the all documents view.
notes://servername/__.nsf/
If I put this in the address bar, it works fine. If I put it in a link, it goes to the all documents view.
Any help would be greatly appreciated.
You could try formatting it as: notes://servername/__.nsf/nameOfXpageYouWantToOpenTo.xsp?OpenXPage
Have you set the launch properties for the database? You can specify a designated XPage in there too.
The format you are looking for is:
notes://servername/yourdb.nsf/someview/unid?OpenDocument
in the "someview" view you add a form formula to point to an empty form that has the property set "open XPage instead" - careful there are 2 of them: for web and client.
If you don't use native forms and the Xpage is always the same, then you can skip the step with the form formula and the extra form and edit the properties of the existing form.
Paul's solution should work too.
Use this code syntax to open any XPage in the Notes client:
#URLOpen("notes://Host/Path/Database.nsf/XPageName.xsp?OpenXPage")
Additional details:
And use the following to open a specific document in the XPage where unid is the unique document identifier for the document:
#URLOpen("notes://Host/Path/Database.nsf/XPageName.xsp?documentId=unid&action=openDocument")
Related
I have a page, that is a search form (lets say - search.xsp). If document are found, multiple links are generated to document links (item.xsp).
I would like to keep search preferences in case user uses "back" button, so I can serve him with last searched data by him.
There is context.redirectToPrevious() method, but I can't use it because of on-load redirect.
So, how can I achieve that? Any help will be appreciated.
can't you store the search queries made in a sessionscope so you have them available when the user hits the back button? you can check the available values via the debug toolbar
Basically what I want to do is create a form whilst within another form and pass values from the earlier form to the second. Complicated I know but here is what I got.
#Do(#Command([Compose];"LPK"); #SetField("PR_Make"; PR_Make))
The fields in both forms have the same name and this code is called when first document is attempted to be saved.
I think instead of editing the field on the second form it just saves a field as itself instead. Any help appreciated.
The best and common way is to enable form property "Formulas inherit values from selected document" in second form "LPK".
Add a default value formula to second form's fields you want to inherit and put just the name of field itself in. For your example default value formula it would be
PR_Make
Make sure you save document first and then create the new document.
Knut Hermann's answwer is the 'standard' way of achieving such things but there are other methods- eg you can use environment variables ..
Something like:
#Environment("PR_Make") := PR_Make;
#Command([Compose];"LPK");
Then set the default value for PR_Make in your new form as ..
#Environment("PR_Make")
FYI Environment variables are written to the user's Notes.ini file and so remain even after Notes has been closed and re-opened. #Environemt doens't work too well with Web applications as it uses the server's notes.ini.
An alternative would be to use profile documents:
#SetProfileField( "PRDefaults"; "PR_Make" ; PR_Make;#Username);
#Command([Compose];"LPK");
.. in the default field for PR_Make on new form :
#GetProfileField( "PRDefaults"; "PR_Make"; #Username);
Profile documents are stored as a kind of hidden document in the Notes database and persist with the database. The last parameter sets a further subdivision by username so each user gets their own profile doc - a bit like a personal profile for "PRDefaults". You can miss this last parameter #Username out, to have one profile doc per database but there's a risk of two people trying to use it at the same time and clashing.
Profile docs also work with web applications.
We use the search feature in the Extension Library Layout control to search a view. It works as expected. But we wold like to expand that search.
The documents in the view each could have one to many "comment" docments. The documents are displayed on the issue xpage with an "embedded" view. The comment is associated to the issue via the parent's UNID. There is a parentUNID field on each comment but the comment document is not a traditional response document.
We would like to be able to search all issues and their comments without having to display the comment in the view. When the search is performed, we want only the issue document to display in the view.
Is it possible to expand the search (with out creating my own search box) to search the comments as well as the issues? If so how would I do that?
A repeat control may be the best way to do it. Then you can search a view containing both. For each row, if the document's Form is an issue, display that. If it's a comment, get the "parent" and display the values from that.
You might want to make each row contain a Panel, so you can attach a dominoDocument datasource for each row containing the documentId of the issue (remembering to set ignoreRequestParams of course!)
I have an embedded View within my form which has a bunch of agents in the embedded view.
However when i select rows(documents) in the embedded view and run the agent (eg "Do a multi profile update") it does work but it does not make any changes to the documents selected. Like the prompt in the lotus script agents does work and pop up but no updates are made.
When ran externally from the view it works fine so for some reason it does not work from an embedded view is what i feel.
The agent within the view is an Action which uses a formula language code #Command([RunAgent];"updatePeople")
were the updatePeople is a lotus script agent.
any ideas or suggestions guys?
I think you have to access the selected documents using an action in the embedded view with the LotusScript logic inside the acrtion instead of calling agents. You can find a complete answer here (with full explanation and code sample):
Domino Designer: Access selected rows from embedded view
I am not sure if this IBM TechNote explains exactly the same issue, but it seems very similar:
How to get a handle on selected documents in an embedded view when using LotusScript
Does the ID have the correct ACL settings for the agent to run?
Does the ID have the ability to edit documents?
Does the Agent have the proper save statements in the code?
The example code in the above link is doing a full db search of unprocessed documents. I would suggest using the ViewEntry document collection. This will allow the agent to run faster since the view could be customized.
Another way to go if you are having issues with processing is to set up a flag field that is updated with the save of your document. The flag field could be used in your view selection field to have the documents fall out of the view if that is desired.
Very new to Lotus designer.
I am trying to create a simple form with a field which is updated from time with additional information. I want the admin user to be able to update this information on the same form interface as the user viewing the information.
It appears I do not really understand how to get the form to display information entered into it previously.
I did Ctrl+shift view of the database and saw all the previous entries but I can not seem to get the form to display these information as well as allow me to append to them.
Kindly help.
Thanks.
Have a look at the online Domino Designer help - for instance the sections on designing forms:
http://publib.boulder.ibm.com/infocenter/domhelp/v8r0/topic/com.ibm.designer.domino.main.doc/H_ABOUT__FORMS.html
A form is used to create a new document or to edit an existing document. Since you say that you can see the previous entries, you must be creating a new document for each entry.
If you want to see and modify the contents of an existing document, you have to navigate to the document and open it for edit.
If you want the user to see a list of all the previous documents while he is creating a new one, you can add an embedded view to the form and use that to display data from the previous documents.
If you want all the information to be in a single document, then you need to stop creating new documents and just select the exiting document, open it for edit, make your changes, and re-save the document.