Hide totals detail in categorized view in XPages? - xpages

I have a view panel displaying a view. The view has a total column in front of a categorized column that shows the total for that category. How can I not show the number when it is on the detail line?

Please change the below Xpage view column formula, according to your totals column name.
viewEntry.isDocument()? '' : viewEntry.getColumnValue('<totalColumnName>')
where viewEntry is the request variable scope name under which row data made available.

In the view move the totals column behind the categories and use the property to hide details. The column sequence in the view and in the view panel don't need to be the same. So you can move it back in front in the panel.

Using this technique does not work for me using r10 FP6 and Chrome version 90.
Total column behaves as a UI-only notes column function, and thus throws an error with a viewPanel column formula like return view1.isDocument()?'':view1.getColumnValue('totCol1');
Simply binding the viewPanel Column to the notes (total) column works, but the detail rows ('1's) are not ignored.

Related

Kendo UI For Angular2 - Grid Row Select

I have a working <kendo-grid> component with 10 visible rows over a data set of 34 rows (approx 4 pages). Sorting and selecting is working as expected.
<kendo-grid [data]="gridView"
[pageSize]="pageSize"
[skip]="skip"
[pageable]="true"
[height]="300"
(pageChange)="pageChange($event)"
[sortable]="{ mode: 'single' }"
[sort]="sort"
[selectable]="true"
(sortChange)="sortChange($event)"
(selectionChange)="selectionChange($event)">
Say I select second row. Then I sort the table and the selection stays on row two but of course it's highlighting a different record. It's always selecting the second row on the grid, which of course, it's what I want.
How do I clear the selected row in my (sortChange) event so at least the user isn't presented with a different selection that they one they already chose. I am open to some kind of data binding attribute for selected row that I could set to null or some property on gridView or even poking around inside #ViewChild .
Any help would be appreciated.
Normal Sort
Ascending Sort
Descending Sort
I had a similar question here: Select grid row item from code
Basically, you also need to select the grid row item from code without user interaction and this is currently not supported in the current beta build of the Kendo UI Angular2 controls.
In my application, I resort to triggering a click event on the row I want to select. :/
I do this in a case where I have 'up' and 'down' buttons to rearrange the grid and want to maintain my selection when I switch items.
var grid = document.getElementById('myGrid');
var rows = grid.getElementsByTagName('tr');
rows[idx].click(); // add one to the desired row index to skip the header row
Here's a (sloppy, minimal) Plunkr of this scenario: http://plnkr.co/edit/09dlqdl0Xchoy0e5zKRq

Displaying Lotus Notes documents in a specific order on a web Page

We have a web site in which it is built using Lotus Notes. This site allows users to submit their applications for employment. On the initial screen the user selects the location and/or area of interest they are interested in. From their selection, a listing of the various positions available are displayed.
The issue that we are having is trying to get the listing to display the various positions in some type of order. The listing is displayed using a view.
Within this view, there are 4 columns. In the first column, the job title is displayed. In the second column, is the shift, the third column is the area of interest and the last column is the reference number. In the first column of the view, this is the value for the column title - "Job Title"
Below is the formula for the column value:
ThisDB := #ReplaceSubstring(#ReplaceSubstring(#Subset(#DbName; -1);" ";"+");"\";"/");
Temp := "" ;
"" + temp + jobTitle + ""
When this is displayed, it is displayed in order by the document ID, is there a way of getting this to be displayed by the area of interest? The area of interest would appear as "Purchasing", "Accounting", "Sales", etc.
Any help with this is greatly appreciated.
Thank you,
Jean
You need to open the view in Notes Designer and double-click on one of the column headers to open the properties. You can set a sort order in the properties dialog for the area of interest column, and make sure no other columns are sorted.
Alternatively, you can add a hidden column just for sorting as the first column from the left. That column can be the same value as area of interest (or anything else you need to sort by) but it won't display when the view is rendered.
I found the issue - within the formula we were using "searchview" and with the sort order for this defaults to "relevance". By adding the "searchorder=4" option users the designated column we have set as the sort order for the listing. Thank you for your comments and hope this helps someone else.

Extend automatically last column in a View - Lotus Notes

I have a view that contains 5 columns. When the application is running, after the 5th ( last column ) there is a big space whici goes at the end of the view.
I want the last column of the view to be extended automatically and to go as far as the view is. Thank you!
You just need to check "Extend last column to window width" on the Style tab of View properties:

How to prevent a viewPanel with category filter showing empty rows if filter is not set

I'm having this categorized view displayed in a view panel where the category column itself is not shown. Instead I'm displaying a combobox above the viewPanel where users can select from all the categories available (see screenshot below). The combo is bound to a scopeVariable and is refreshing the viewPanel onChange. The viewPanel has a computed categoryFilter reading from the same scopeVar. That all works nicely.
Now I also have implemented an additional wildcard (*) value in the selection list which (if selected) programmatically sets the cat filter to NULL. This way I'm forcing the viewPanel to show all entries. Again, this works fine, but with the drawback that now the view is showing empty rows where the category entries would be shown normally (in the screenshot you see empty rows above each entry, with 2 entries for the category "edcom GmbH" obviously belonging to the same category; those aren't separated by an empty row):
One way to at least hide those empty rows would be through means of css coding. But I would prefer those rows not being rendered at all.
Can this be done at all using a viewPanel, and how? Or do I have to use other controls like a repeat or a dataTable maybe?
Thanks in advance,
Lothar
One "hack" (an ugly one I admit) would be to change your categorization column from Firma to Firma:"--All--" or Firma:"*" and then instead of setting the category filter to NULL you set it to "--All--" (or "*").
The double category hits the indexer, but should do what you need.
Obviously there's no easy way. So meanwhile I'll stick to this css-style solution:
In the view panel und All Properties - data I set var = "entry". Then, under All Properties - styling I set a programatic value for the rowClasses property:
if(entry.isCategory()){
return "rowStyleHidden";
}
return "";
The style class "rowStyleHidden" hides those rows using
display: none;
Don't know yet how this turns out performance-wise, I'll have to observe this once I implement it in a copy of the real database.
You can also switch to a none categorized view, by having the viewname calculated based on the value in combobox.

how to hide the grand total row in views using #formula or lotusscript

I want to hide the grand total row in views using #formula or lotusscript.
How should I do this?
There's no Formula or LotusScript for hiding the grand total in a view, but I found a work-around for the cases where the grand total does not make business sense at all and would only confuse the users.
Displaying the view as an embedded view in a form, using Show single category leaves out the grand total row. You may need to use this view only as embedded view and have otherwise useless fixed category for all documents (i.e. put "1" in the formula for the categorized column and use the same in Show single category). You'll also need the SaveOptions text field with default value "0" so the users don't get dialog asking whether they want to save the document (after all, for them this is a view) and the line Continue = False in the QuerySave event.
Then you need to find how to best integrate this with the other views - maybe use Auto frame in the form properties if your application uses framesets. The users may not be able to tell the difference.
Seems like a lot of work for removing one line from the view but I am not aware of another way to hide it and sometimes it's worth the added complexity.
Does that help?
You can also create a Filtered By Category view by using #SetViewInfo with first column with value "1" and filter by this values. All documents will be displayed only total sum will be hidden.

Resources