Order Groups in Tabulator - tabulator

How can I set the ordering of my groups in Tabulator? It is not clear to me what determines which group comes first. I would like to be able to re-order the groups.

From Documentation http://tabulator.info/docs/4.0/group
Based on the order of array
groupBy:["gender", "color"], //group by gender then favourite color

It seems that the order of the underlying items is what orders the groups. So whichever group the first item belongs to will be the first group, and so on.

The order the groups are displayed on the table is determined by the sort order of the rows they contain.
The Row Management Pipeline Documentation shows that rows are first sorted, then grouped. This means that after sorting the rows Tabulator will iterate over the data row by row, creating groups as needed, so the group containing the first sorted row will be first etc.
So to reorder your groups, set the Initial Sort for the table

Related

drop down list suggestions limited to particular values

I have a list of group leaders and each group leader has his own team, when a group leader clicks on his name, it leads him to his employees, I wanna make a drop down list so he can select the employee he wants but i dont want the drop down list to show all the employees from all the teams, i only want it to show the employees of that particular group leader.
there is no data limiting possible so i wonder how it is possible to do it, or if it is even possible.
Thank you in advance.
Create a reference data table with one column - 'leader'.
Create a reference data table with two columns - 'leader' and 'employees'.
Create a Document Property ('ldr') based on distinct column values from the 1st data table - which will allow leaders to select their own name.
The value of 'ldr' will now be used to filter the data in the 2nd data table, by going to Data Canvas, adding a 'Filter' transformatopm and using a custom expression like this:
case when DocumentProperty('ldr') = '' then true
when DocumentProperty('ldr') != '' and DocumentProperty('ldr') = [leader] then true
else false end
So now your 2nd data table should have only the employees of the selected leader.
Create a new drop down Document Property ('emp') based on distinct values in the employee column of the 2nd data table.
These two document properties created in the previous steps are just filters which have the appropriate employee values but are not linked to any visualization yet.
So to link the filters to the visualizations, go to Visualization properties -> Data -> Limit Data using expression -> Use an expression like:
[employees] = DocumentProperty('emp')

SSRS Cells auto-merge

I'm having trouble unmerging cells on the report.
3 Suppliers for the query
I have a SQL query that shows 3 instances of a supplier (left joined to contact) as shown below. However, when running the report for the query the 3 instance of the supplier is merged into one. This is not desirable in my case because when exporting the report to excel, I'd like to be able to sort columns based on other properties, however, this would not be possible due the the merging of the rows. How can I get results to show individually?
Cells are Merged on the report
Within the properties of each Row Group you can specify which columns to group on. You generally don't need a separate group for each field, but that's OK. In your last group, the one called "(Details)", if it is not grouped by anything, it will show one row per line of results from the query. So take a look at what it's grouped by. As long as the rows are in your dataset, the report will group or show them based on how you configure the grouping here. Grouping on nothing means it will show all rows.
Another tip is to align the end of your header textbox with the line of one of your columns. This will prevent it from creating an extra column in Excel for the "City" field.
Your report does not need all of those groupings - the SSRS grouping is not like SQL. You should only group when you want to aggregate data on that field. Normally you might have a company with its address in various fields in one group but you only need to group once on the Company Name or (preferably) ID - not on each field and not a separate group for each. You could then show details of various invoices in other columns that aren't grouped.
But since you want to display the company data on each row, you would not want ANY grouping on the company.
To fix your issues, remove all the groupings (but not the rows) and just leave the detail group (which doesn't have a Grouping).
You can check out MS Docs: Understanding Groups for a better explanation.

Create Notes view for duplicate parent documents

We have an Xpages application and recently discovered an issue where there are several Notes documents that have duplicates but the duplicates are PARENT documents too and NOT response documents. Is it possible to create a Notes view that will show duplicates where all the duplicates are parents? I know the formula for showing conflicts is the following but what about where they are all parents?
SELECT #IsAvailable($Conflict)
Expounding on my comment:
Create a view which is categorized on the first column
In the first column formula, put in criteria that you would use to determine a duplicate. This may be the Document Unique ID, or maybe another field or combination of fields.
Add a second column that contains the number 1. Then enable column totals on this column.
Now look at this view you created. With the view categories collapsed, look for any number greater that 1 to determine which documents are duplicates.
I think what you are asking is not how to identify the duplicates - but how to find out which of them are parent documents. So basically you would create a view as Steve suggests - but instead of putting a constant of 1 into the second column I would suggest putting either #DocChildren (for immediate responses) or #DocDescendants (for all responses and responses to responses).
If I understand your logic then all the ones returning 0 (zero) are child documents and those returning 1 or higher would be parent documents. Of course you could also use an item on the document in your view formula - if it only exists on the parent doc (or its value can tell that it is a parent doc)
View selection formulas act on only one document at a time. They cannot perform lookups. They have no way to compare two documents. There is therefore no possible way for a view to identify duplicates.
A view can, as per the other answers, categorize documents based on common values. If there is a single field that is supposed to be unique across all documents, you can categorize on that field. That will give you a visualization of the duplicates, but it won't filter them in or out.
The only way for a view to filter duplicates - either to show only duplicates, or to exlude duplicates - would be if you run an agent that reads all documents, looks for those that are duplicates, and marks them with a special field value - e.g., IsDuplicate = 1. Once you do that, you can create a view that selects all documents with IsDuplicated = 1, or a view that excludes IsDuplicated = 1.

Using the sort in Query to sort booleans

There may be a better way to do this but my client has a list of books they want displayed. A number of them are by the society itself and they want them to display first before any of the other books. I set up a custom type called "books for sale" and I added a boolean field indicating that this was a society book.
I created a query "all books" in which I sorted against the title and then the boolean field however it does not sort preferring to display numbers first followed by an alphabetical listing.
Is there a way to do this so those books that have been flagged as "true" display first in the list?
Kind Regards
Simon
You should sort by boolean field first and the title second, not the other way around.
Sorting by multiple columns is done like prioritizing - it means that collection will be sorted by the first column, and if there are any rows with the same value of that column, only then will those rows be sorted by the second column. If there are some rows with the same values in those 2 columns, the sort would be performed by the third sorting column if there is one. And so on..

Can I create a COUNTIF calculated column in SharePoint?

Is there a way to create a SharePoint calculated column that returns a count of the number of entries in a list? So If I have 3 customers in my list with the company "Starbucks" I'd like the field to return "3"
(Edited some wording for clarity per suggestion from dariom).
You may be able to get what you want with another list using a not-so-well-known variation of a lookup column.
Let's say you have a list called Companies with values in the title column like "Starbucks", "Peets", etc. Now you also have the Customers list you refer to, but the "Company" column is a lookup column pointing to the title column in the Companies list.
You can add a count very similar to what you described to your Companies list. Go to your Companies list, add a column of type "Lookup" referring to the Customers list and you'll notice that in the drop-down area where you define the lookup if you point back to the Customers list, you'll have a new option called "Count Related". This is here automatically because it recognizes that the Customers list has a lookup pointing back to this one. Select that Count Related option and now your Companies list will have a column counting how many customers are associated with that company.
No coding, Javascript hacks, or anything. Just hidden SharePoint auto-magic.
No, I don't think there's a way to do this using the out-of-the-box calculated column.
Some other ways you could accomplish this are:
Create a view for your list that with a group by on the company field and include the total count. This is easiest, but might not be exactly what you're looking for.
Create a custom column type that executes a CAML query to find items that you're interested in. There is a learning curve if you've not done it before and if the list that you're adding this custom column to has lots of rows, you'll be executing a query for each row which is inefficient - it'll be OK for a small number of rows.
Use an event handler on the list that updates a column value each time a new item is added or removed from a list. This is easier, but can also be inefficient if you have a large number of items in your list.
As dariom said (damn my slow typing skills, +1!), only the current row can be operated on with calculated columns by default in SharePoint. There are a couple of documented workarounds involving SharePoint Designer or jQuery, though.
You can get a Count of specific list items in an XSLT Data View
To do this you will need SharePoint Designer.
Right click on your SharePoint List view (ensure the list view contains the field you want to filter by) select convert to XSLT Data View. Then in the Data Source Windows select Data Source Tab and drag and drop the field you want to get a total on for the specific items into where you want it displayed in your XSLT Data View. Click on the numerical value that is showing you should get a lightening bolt icon, select the drop down and choose Count, then select again and choose Filter. Select "Click here to add a new clause" then choose your field name again and enter your unique value as Starbucks and click OK, you can repeat this process for other fields you want the totals on. You will now see the total number of Starbucks items in the list.
I got something similar to work in a way similar to Niall. Basically, I:
Based on the source list, created a Data View Web Part (DVWP) on a "test" web
part page.
Added the footer column, which gives a count.
Set the filter for my conditions (i.e., the items I want to count).
In the code, deleted the recurring items row.
I was left with just the footer, which displayed a filtered count for all the list items. I further customized the footer by taking out the shaded background. Finally, I exported this web part and imported it onto the page where I wanted users to see a total of items in the list (which met the criteria).

Resources