I am trying to do something simple in Tibco Spotfire, to try and set a document property in webplayer by specifying a property in the url. I cannot get this to work.
I have created a document property called 'test' which is simply a string
I have then created an input text control bound to that document property
I would expect that if I opened that report in webplayer with a url prepended with &configurationBlock=test%3D"helloworld" then the input text would be populated with the value helloworld. However, it is not.
This seems to be a reasonably simple thing to get working, I have tried what I think is every possible variant of encoding the data to no effect. Is there something I am doing wrong that could make this work.
you are going to hate this answer :)
you need to put a semicolon at the end of the parameter assignment. so you should have:
http://example.com/Spotfire/stuff?configurationBlock=test=helloworld;
Related
In Work order tracking application in actuals tab materials section when user clicks on New row by default the transaction type = ISSUE . I would like to change this by default to RETURN and remove issue from the look up (I was able to remove ISSUE from the lookup). This requirement should only work for PM type work orders. Hence I tried to write an automation script on MATUSETRANS.ISSUETYPE attribute launch point however it throws null pointer expection which trying to perform setValue. I tried using 2L,7L and 11L however it doesn't work.
if(onadd) ==True:
mbo.setValue("ISSUETYPE",'RETURN')
Is there any other way to do this?
We basically need to trigger the code on a field that sets after ISSUETYPE is set using the out of the box code so I tried on field like currencycode or condrate (attribute launch point) and it works like charm. You will have to use 7L though to the existing code.
I've been developing in Lotus (IBM) Notes/domino for something like 25 years and I've never come across this before.
The application is Notes client based, using Notes 9.
I open a document (DOC A) , which uses FORM A. From this document, there is a button to create a new document which uses FORM B. This opens in a new window. DOC B is not a response of DOC A, but some (a lot) of LotusScript copies fielse from DOC A to DOC B.
So now we have 3 windows open: The original application, the DOC A doc and the DOC B.
I make edits to DOC B, and save it. I close it, leave DOC A open, and navigate to another view where DOC B can be found.
Interrogate the Document Properties field list to see the field I edited ("InvoiceComments" in my case). Yep, my text is there.
Then I run a script agent which gets DOC B and prints up the content of InvoiceComments. It's blank. Write a Web agent to get same doc ... my text can be found in InvoiceComments.
It's definitely the same document, same UNID etc.
So that is: When looking at Document Properties, fields list, I can see myy edits in the field values. When running a script via Notes Client to get that document (either via UnprocessedDocument or from a view), the field has its 'old' value (blank)
The only clue I have as to what's going on is that if I close the DOC A, then all of a sudden the agent that prints "InvoicComments" value starts to honour what's on the disk (ie, it behaves).
Sounds like a bug in the notes client, but I'm at a loss as to how to get around it because people will want to do the process above.
I had this some time ago when working with big script libraries and global variables.
I needed a LOT of debugging to find out what was wrong.
Essentially the problem is: As long as there is a variable ANYWHERE in the code that holds the document Doc A, then any script -run from whatever context- will get the "old" values of that document (despite the frontend showing you the changed item value).
Either Delete the NotesDocument- Object holding doc A in any code from doc B or use Set .... = Nothing to prevent that from happening.
So using either of these two lines will help:
Delete docA
Set docA = Nothing
I can't take credit for this code, a consultant wrote it, but maybe this pattern will fix your problem:
Set doc=uidoc.Document
newentry=doc.CommentEntry(0)
id=doc.Universalid
Call uidoc.Fieldclear("CommentEntry")
Call uidoc.Save
Call uidoc.Close(True)
Set doc=db.GetDocumentByUNID(id)
doc.CommentEntry=newentry
He found that even when you have a "valid" document object with a valid UNID, when you have it open as a UiDoc, Notes (frustratingly) keeps a copy in memory, so he had to resort to this idea. (Is it a bug or just a quirk?) I think this is essentially what Torsten is suggesting as well.
I am using NeoLoad, I am facing an issue that a dynamic value which is not in previous source pages.
I logged in as a User.
I just click on Menu Link, when I click on this menu link, a dynamic value is generating with this link.
In the above the URL the StartPage=1433433137 this is dynamic value, which is not found in any previous source pages, so when I click on link menu this URL generate a new StatPage=13232334, so how to extract this value or how to handle this.
When I verify this variable name StatPage in previous sources pages, I found in a html page as JavaScript variable is defined like var StatPage = true; and also url.open('GET','id=1&StatPage=' + startDate, true);
And another .js file is also having this variable like
if(typeof StatPage!="undefined"&&StatPage) - <some more text here>
Any one help how to handle these type of dynamic values, I am using NeoLoad Performance testing tool.
I don't have a full solution for your situation, but would like to share some thoughts that may give you some direction.
It looks like the 10 digit integer number in the query string after StartPage is a dynamic parameter created on the client as a result of executing a JavaScript function. Based on the variable name startDate it is stored in, I think there is a date-time related function. If I need to guess further, this may be the epoch time convert to seconds (see jquery convert number to date?). You can verify this with developers.
In any case, to parameterize such test case you need an option to parameterize a query string with client-side functions. You can check if NeoLoad supports, such functionality.
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.
I am working on a new web app in lotus/domino. I am newer to lotus/domino programming, so forgive me for not knowing something simple.
What I am trying to do is display a table of information, with one of the columns containing a link. The link is formatted like [http://server/app.nsf/form?openform&ideaNum=1&var2=foo2]
How can I retrieve the information from the url, to get information from a view or a document?
So far I have tried to access the query string in the webQueryOpen event, but lotus runs the agent before the DOM writes to the browser, the query_string isn't available.
I am not sure how else to get information from one form to another in lotus.
Thanks for the help.
-Kris
If you're passing multiple params in the query_string, you can get Domino to do a bit more of the work for you. There's an Function command - UrlQueryString - that can format the params into a list, delimiting at the "&".
E.g. server/app.nsf/form?openform&ideaNum=1&var2=foo2
becomes a list:
openform
ideaNum=1
var2=foo2
To use it, on the destination form create a multi-value text field called something like "QryStringList".
Set it to be computed when composed, and set it's value to #UrlQueryString.
In your WebQueryOpen agent, you can access the params as doc.QryStringList(0), docQryStringList(1) and so on, if you're using Lotusscript.
I'm fairly sure I put this together using info from the IBM/ldd forum, but the exact source is lost in the mists of time and memory, so apologies if I've copied someone's post.
Just as a follow up, I found that you are able to specify an on form variable named the same as QUERY_STRING. The variable is actually a reserved term for Lotus, so Lotus pre-fetches the variable before running the information out the browser.
Due to the pre-fetching, you are able to access the url information during the webQueryOpen event.
I hope this helps someone else looking for the same type of functionality.
-Kris