Datatable: How to write a headline to place of 'Show x entries' - datatable

I'm using thedatatable for my project. I want to use the place of Show x entries as the headline of my table.
I know how to remove Show x entries from the Datatable. But I could not find how to write my headline like the below example:

Related

Is there a way to hide the formula in a Google sheet cell?

I want to block certain users/groups from viewing formulas in certain cells in Google sheet, but they'll have permission to edit other cells values. All they will be able to see is the result.
explanation: it's an advanced calculator. let's say that I want to give the user the ability to put values in cells A1 and B1, and in C1 the formula is =A1+B1.
I want to hide the formula in C1, so the user will only the the result.
There's a few ways to do it depending on how/who is working on the sheet. If people aren't familiar with sheets you can actually hide the formula in a row at the top by using array formulas so in the header:
={" header title" ; arrayformula(a2:a+b2:b)}
The formula would be hidden in the cell that shows the header, all the cells below would just be the calculation. If you hide the row that has the arrayformula and protect it no one will be able to see it. The only thing is you have to also protect the column otherwise if someone hardcodes a value in the column the formula will stop working.
The second option (easier but can run into more issues is the have a 'mirror' copy of the sheet they are interacting with in the same file as a hidden sheet. Basically a duplicate of the tab with all the cells a direct reference of the first tab. So:
Sheet1 = tab they interact with
Sheet2 = 'mirror' tab with every cell being ='Sheet1'!a1, but for the corresponding cell value.
As they edit Sheet the values entered in Sheet1 will show up in Sheet2, then the calculations can happen on that sheet, and then Sheet1, can just be a direct reference to that column in Sheet2. So the calculations in Sheet1 will only appear ='Sheet2'!C2. If you protect Sheet2 and hide it no one will be able to see the formulas. Sheet1 could even reference Sheet2 with an index formula like: index(column sheet2,,) which would return the entire column from sheet2.

Add notes & footnotes to table

I have a report where I need to add a note/number where a record has data in a particular column. I then need to add a reference to that to the bottom of the table, much like a footnotes section you would see in a book.
I've tried adding the rownumber but it pulls in the actual rownumber and not the record count. I'm using oracle for my db.
In my report, if the record has a value for the column RETURN_NOTE (not shown), then concatenate an int tot he end of the TASK_NAME column. Then underneath the table, add the int from above with the RETURN_NOTE value.
You can see the red numbers and their description in the image below.
Thanks
The best way to go here is when you add a calculated field to your dataset where you put your footnotes into the expression. Lets assume your footnotes depend on the Fields!Task.Value and lets call this calculated field Footnotes:
'Name: Footnotes
=Switch(Fields!Task.Value = "Prepare for Coordinator", 1, Fields!Task.Value = "Ready for Closeout", 2)
Now add another column to your tablix and put the field Fields!Footnotes.Value in this column.
Then add a rectangle or another tablix somewhere in your report (put in the values which explains the footnotes). Then go to the properties of this tablix/rectangle (pane on the right) and under Other > Bookmark write in a bookmark code (for example: FootnotesExplained).
Go back to your textbox with the Fields!Footnotes.Value in it and right click on this textbox and go to Text Box Properties > Action and check the Go to bookmark option and write below your bookmark code from before FootnotesExplained.
When you click now on one of the value in the column where the footnotes are the report will jump to the tablix/rectangle where your footnotes descriptions are.

How to update a Google Forms dropdown list based off an existing spreadsheet?

So I've been looking for a way to do this and found many interesting answers about Google App Scripts, but none seem to get at what I am trying to do. I am looking to have a Google Sheet (Spreadsheet) with a column of choices. Then I have multiple forms which has a question that uses a drop down menu of those same choices. However, this list of choices gets updated semi often, so we currently find ourselves manually updating 6+ forms with the new information based off of the sheet. I'd like to know if there is a way to take the information from a spreadsheet and have it automatically update the drop down list.
I haven't really done any Google Script stuff, but I can hold my own in scripting generally. I just need help finding the right direction.
You can try getting a range of values from the sheet and loop through a column until last row as below code.
var values = SpreadsheetApp.getActiveSheet().getDataRange().getValues()
for(n=0;n<values.length;++n){
var cell = values[n][x] ; // x is the index of the column starting from 0, replace x with some value
}
Once you get the values into cell variable, you can simple add them to the form drop down list.
// Open a form by ID and add a new list item.
var form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz');
var item = form.addListItem();
item.setTitle('Do you prefer cats or dogs?')
.setChoices([
item.createChoice('Cats'),
item.createChoice('Dogs')
]);
You can refer to this documentation.
Hope that helps!
You should be able to use a formRanger AddOn which would allow you to update a spreadsheet.
This would then automatically update all the drop down dependent on the data you have added to the spreadsheet.

Using XPath to locate on a button within a table

I have a table with several columns. The first column contains unique data, the 5th contains three buttons (Edit, Assignments and Delete).
I would like to use an XPath expression to locate on the edit button for one of the rows by indentifying the row using the unique data from column one (think that made sense).
I have built some expressions which will allow me to locate on the first column and edit button independantly as follows:
//td[text()='Managers']
and
tr[2]//button[text()='Edit']
The closest I can get to doing what I want is:
//td[text()='Managers'] | //tr[2]//button[text()='Edit']
...However this will locate on the data/button in column 1 AND 5 at the same time, what I want is just for the button in column 5.
The reason I want to do it this way, is so later I can pass in 'Managers' as a varaible in order to select the row (as its unique and meaningful data), and then press the edit button in a different column on that row.
Hope this makes sense!
Thanks
The question isn't very clear as posted, especially because I can't see any relevant part of the HTML. But if I understand this correctly, you can try to select the row that has Manager in it then get corresponding Edit button like so :
//tr[.//td='Managers']//button[.='Edit']

Infragistics UltraGrid with Expandable Rows

I'm showing to my users, a list of items within a UltraGrid, that come from database.
Now, i'm with one need and I don't find anything useful or any documentation that is clear nor none tutorial is available where I can learn.
I need extend the functionality of this grid, to, set a (+) Expand function, that, when the user press that button (+), the row expands and shows the items that are in the History.
It is anyone in the world that can help me to solve this issue or indicate appropriate docs where I can Learn?
Very thanks.
The trick is simple. You just need to bind the grid to a DataSet that contains two (or more) tables and the correct DataRelation object that glues together the tables.
You need also to be sure that the property grid.DisplayLayout.ViewStyle is set to MultiBand (it is the default so it should be already set).
So, for example, in this pseudocode I load two tables and add them to a dataset, then I define a supposed relation between the columns involved and at last I bind the dataset to the grid.
DataSet ds = new DataSet();
DataTable dtItems = YourLoadDataTableMethodHere("Items");
ds.Tables.Add(dtItems);
DataTable dtHistory = YourLoadDataTableMethodHere("History");
ds.Tables.Add(dtHistory);
DataRelation rel = new DataRelation("Items_History_Relation",
dtItems.Columns["IDItem"],
dtHistory.Columns["IDItem"]);
ds.Relations.Add(rel);
grid.DataSource = ds;
This will automatically force the UltraGrid to create two Bands (grid.DisplayLayout.Bands[]), in the first Band (Band[0]) you will find the rows of the Items datatable, each row has its [+] button to click and expand the second Band (Band[1]) where you will see the History rows related to the row in the first Band

Resources