IBM Notes combobox choices not updating even when refreshing - lotus-notes

After saving a specific field in a form, it will store on a view. This view is used by a combo box with a #DBColumn for the choices on another form. This combo box fails to show the recently made field as an option for choices. Even refreshing doesn't do the trick.
The combo box is editable and has "Refresh fields on keyword change" and "Refresh choices on document refresh" checked.
Thank you in advance for your help.

Use the "NoCache" parameter in #DbColumn.
"NoCache" gets the results of the lookup from the database; no cache
is used. If you want to ensure that Domino retrieves the latest
information for every lookup, specify this option.

Related

Partial refresh after OK in name picker control

how can I establish a partial refresh after I select the OK button in the xe:namePicker control ?
I only have the for property which does copy the selected value in the assigned field.
The onchange event for that field does not always seem to recognize the value change.
Instead of an Edit Box, I would recommend using Dojo Name Text Box, as covered here. It avoids the need for validation - with an Edit Box even though you provide a Name Picker, users can still enter values manually and can edit them after selecting from the name Picker. The Dojo Name Text Box and Dojo List Text Box are the only controls I use with pickers and almost always use onChange with them, without issue.
One caveat is that the Events tab defaults to onClick. On more than one occasion I've coded onClick instead of onChange, but it's easily identifiable and rectifiable.

Multi-Select as an Available Filter in a Saved Search

I checked SuiteAnswers and here on Stack overflow but don't see an answer. Is there a way to make a Multi-select field in NetSuite as an option for an available filter in a Saved Search. I tried to do this by creating a test MS field on an Employee and creating a saved search. However, when adding it as an available filter it grays out the ability to show in the filter region, which, by all practical purposes, makes it not usable as an available filter.
Has anyone found a way to do this? Or do I have to have multiple searches for variations on the values we want in the multi-select, which is not ideal?
This is very frustrating NetSuite behaviour however I have found a workaround that works some of the time.
Create a saved search
Go to the "Available Filters" subtab
Add the Select/List type field(s) you require
Tick "Show In Filter Region."
At this point the "Show as multi-select" checkbox will be greyed out (disabled.)
Save and run the search.
Click "Edit This Search"
Navigate back to the "Available Filters" subtab and the "Show As
Multi-select" checkbox should now be enabled, tick it.
Save and run your search again.

Conditional form fields in Lotus Notes

I try to build an advanced form in Lotus Notes. Some fields should hide in condition to the state of other fields.
I can hide one field by defining a formula for this. But the problem is I have to first save the document, close it and reopen it to see the fields are hidden.
I want that the field is hiding while the UI doc is in edit mode when I change the state of fields.
Thank you!
Best regards
Robert
You can set option "Refresh fields on keyword change" to recalculate the hidden formulas of other fields.
This option is avaliable for fields of type
Dialog list
Checkbox
Radio button
Combobox
Try to use one of the following commands:
ViewRefreshFields
#Command([ViewRefreshFields])
or
RefreshHideFormulas
#Command( [RefreshHideFormulas] )
I hope this helps.
You can use various approaches to achieve this. If you use some sort of select-fields like Radiobutton or Checkbox you can use the field option "Refresh on keyword change" to recalculate the formula.
You could use Call notesUIDocument.RefreshHideFormulas but beware of it's greedy resource consumption on large forms.
Link on IBM Knowledge Center

checking if current user is author of the document

I have a formA where I have a field '_author' which is of type Authors/Computed for display with value (#Subset($Updatedby;1)). I display information from formA on viewA. What I want to achieve is that documents that are created by you are only visible to yourself on viewA. I tried the following formula in viewA 'View Selection':
SELECT (form = "formA" & #UserName =_author). Even though I know that these two variables have the same values when I read it from the document's properties, the condition is not satisfied and I do not see a single document. If I delete everything after "&", the view shows all documents.
All is hosted on a server which handles users.
A handy workaround is to create a Page with an embedded view. This view is exactly like your view but has an additional first categorized (!) column with your field _author.
Put into embedded view's property "Show single category" the formula #UserName or #Name([CN]; #UserName) depending on how your categorized column _author is formatted. Show then always the Page instead of the view.
This way you avoid trouble with "Shared, private on first use" views and users see exactly their own documents only.
#UserName works in a special manner in selection formulas in views. In your case the view should be Private on First Use. Read further here: http://www-01.ibm.com/support/docview.wss?uid=swg21089773 .
Be aware that this lead to all sort of issues, e.g. when you update the design of the view users must remove the view manually to get the changes deployed.

viewpanel selections being unselected on dialog box show

I have an extension pages dialog box on the same page as a viewpanel that has check boxes enabled. If I check some check boxes then show the dialog box, the selections in the view panel become unselected. Is anyone else seeing this?
I have the same issue and it looks like we're trying to do the same thing. I plan to add the selected IDs to a sessionScope, update their values, then remove the sessionScope.
I found this one, so I'll update here to see if it works: get the unid of selected documents and save to scoped variable
UPDATE:
I got it to work by setting a sessionScope variable for the selected IDs, as in the above example:
sessionScope.put("SelectedIds", getComponent("viewPanel1").getSelectedIds());
In the SSJS script, I changed the code to read the sessionScope array instead of the viewPanel's selections.
Fortunately, the IDs are very small (3 characters), so if there are a lot of documents, it should be ok.
Good luck!

Resources