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
Related
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")
I have created a Google Survey and I want to be able to pass URL parameters into the survey so that I can track where responses are coming from. Ideally these URL parameters will be populated into the spreadsheet.
I have tried something like this:
https://docs.google.com/forms/d/HASH/viewform?src=MY_SOURCE&ref=MY_REF
However, this doesn't seem to be working.
Any help or comments appreciated!
There is no way to pass hidden information, but you can pre-fill form fields using URL parameters:
Open a form in Google Forms
In the top right, click More [...]
Choose Get pre-filled link
Fill in any answer fields you want to pre-populate
Click Submit
To send the pre-populated form to respondents, copy and send the link at the top
I came across this and decided to do the following.
Create a form
At the bottom add your own parameters (lets say user_id)
Click the triple dots on the top right to get a prefilled link
Fill the user_id parameter with user_id
Click Generate and copy the link (Bottom left)
Your link will look like this: https://docs.google.com/forms/d/e/1FAIplshiflshdlshdflkhlkb0Exboi5usdfsdf-f/viewform?entry.1370129364=user_id
In my case I wrote something that replaces {user_id} with the actual user id. The link looked like this: https://docs.google.com/forms/d/e/1FAIplshiflshdlshdflkhlkb0Exboi5usdfsdf-f/viewform?entry.1370129364={user_id}
I did a simple replace (e.g user_id = 123455) link looks like this https://docs.google.com/forms/d/e/1FAIplshiflshdlshdflkhlkb0Exboi5usdfsdf-f/viewform?entry.1370129364=123455 and clicking on it will fill the user_id in the form with 123455
Do this if you don't mind the users to be able to change the data (most of them don't).
I've wanted to pass through hidden information through a Google Form and came up with a little work around:
Create a new page/section (old vs new forms) on the form with the questions that you want filled. If you have multiple pages, make the hidden page the last for simiplicity.
Use the "continue to page" option on the last page/section you want visible to go to Submit.
Use the prefill tool to get the entry IDs and set up the link as you need.
When a user accesses the form through the pre-filled URL, the hidden data will be filled in on the hidden page and submitted with their other answers... Although it will be hidden from an EU standpoint.
I use this frequently for transferring data from one form to another. With the CopyDown addon to copy the formula after each form submit so that it builds the pre-fill URL, that when clicked, has just the essential questions (i.e. record number, name, etc.) to verify the info. Hit Next, then Submit!
Google Form is not allow you to pass information, you may consider use another method/flow in your system
I have scripts that react off of, for example, a client Recalc client event. For example, on my form I have a subtab that users may add or remove items from. Based on actions on this subtab (housing a child record of the parent) I would like a field on the parent to update (say to show a total from the children records).
As I was saying, these events seem to work fine if in edit mode but they do not work correctly in view mode. (even in view mode these child records have a "Delete" option at the end of each row in the subtab. This was provided by netsuite by default.
I wondered if anyone had any tips to best allow this parent field to update real time while in updating the subtab rows with the form in view mode.
Thanks.
You can make a custom field on the parent (header) whose value is determined by saved search. For instance, make a saved search that totals the line values by transaction. Be sure to make it filter by transaction in the Available Filters tab. Make the search public so everyone can use it.
Create the custom field that sources the total from the saved search. Make sure to uncheck the "Store Value" checkbox, as you don't want to store the data, you want to reference the search results. You do this on the Validation and Defaulting tab. You'll see a field for Saved Search there. Choose the search you created above.
As you remove/add/change lines on the transaction, the field updates accordingly. In essence, you don't need a single line of code to make this work - it's all in how you create the search and the custom field that references it.
I have a similar situation posted here.
The NetSuite team answered me by email, and it happens you can't really achieve this on the view mode: some API methods are not available. Their suggestion to my case (and I think it applies to yours too) was really to force a refresh on the whole page.
Of course, you can always achieve this accessing the DOM elements directly, but this isn't a best practice, as your code can stop working if these elements change on a version update.
I had the same problem, I'm not able to restrict on view or remove edit button. But, there was one alternative solution with workflows, you can deploy workflow on child record edit mode restrictions, then if the user clicks edit on view then the record will not be available to edit. This concern will apply to custom record as well.
I have an embedded view in a main form (same database) with a single category of a client code that is custom generated. The view displays all other documents that have that main document's client code in a hidden field.
This works perfectly, except for one user where the embedded view is blank, and the message "category not found" is displayed. This happens for all documents viewed. Anyone else that opens the exact same main documents can see the correct list in the embedded view. The documents are definitely there.
I've pressed F9 a few times, and the "category not found" keeps coming up. I've also shutdown Notes and deleted the cache file, and restarted. There have been no changes to the database for a long time, and this started for this one user a few days ago.
I have no idea whats causing this.
Check readers/authors fields in documents that should be displayed in your embedded view. May be that user just can't see them.
Before I get too stressed, I generally try this:
Remove the database from the user's workspace
Compact the workspace (2nd tab of workspace properties)
Close Notes
Delete cache.ndk
Restart Notes
If that doesn't work, I'd check that the user can see the documents in another way (i.e. if you send a doclink to the user, can the user open it (alternatively, try opening the embedded view directly through View - Goto. Don't forget to use CTRL-SHIFT at the same time if the view is hidden)? If not, the user may have lost a role, or dropped out of a group that provides access.
¿The view is "shared" and not "shared, private at first view"? In that case, you have to delete de "private version" of the view for that user
¿The embedded view is calculated, and show one view for a group of users and a second view for another group? Maybe you're searching the problem in the wrong view
¿The single category is based on a formula or on a calculated field? In that case, the formula calculates a different value for that user
I want to create an action button to do a simple search ( based on some parameters, fields where the user can introduce what he wants to search ). I don't want to use many and many script libraries and so on ... Is there any simpliest method for this?
Assuming you want to search a view, you can simply write the script straight into an Action button on the view. If you need to prompt for parameters, you can either use a dialogbox (or look here), which will require a form design to be created in the database, or just a series of inputbox. Inputboxes are quite limited, but do not require additional design elements in the database, unlike a dialogbox, which requires a form, but you can do almost any kind of interface you require.
You can use form-based searching. Enable full-text search on the database, then click View/Search This View. When the search bar is open, click More (at the right). Click the Form button (the 4th), then select your search form. What forms are available as search forms is defined in the Designer, per form. See the option Include in Search Builder, in the Form Properties dialog box.