Read values from looping angular tabular column - angular7

I have an angular table where table rows and columns are developed from ngfor loop.
As shown in image my table is currently.So when i clicked on save button we need to iterate through each table row and read the values present in each td and need to store them in object.so please tell how to do develop logic in angular.

You can do this using formGroup easily.
See this example,
Table data binding example
Hope this example will give you a better understanding rather than explaining all with words.

Related

How to move a checkbox with a row in google sheets with data sorted using SORT?

I am currently a college student who was trying to make a dynamic google sheet where my data is organized. The premise is as follows:
I input raw data into one spread sheet titled "Raw Data"
That data from raw data is automatically sorted by date using the SORT function to keep it dynamically updated.
If an item in the organized data is checked, then the row turns gray and updates into a corresponding chart.
My problem is that as I add or edit data, the checkbox is stuck to the row. In the first picture, you see the normal data as is.
organized spreadsheet data using a SORT function
However, lets say I add a due date for an assignment on 1/31/23. Then this happens.
Spreadsheet data following SORT function modified to show problem
So overall, my question is how can I lock a checkbox to a specific row so if the row is moved, the checkbox moves with it? If it is needed, I have a public link to the spreadsheet if it helps understand the problem:
Public Spreadsheet 1/31 for Clarification
I currently tried several data validation rules but most of them simply locked the cell from being edited if it was checked.
I also tried modifying the RAW data and adding a checkbox there before the sort function refreshes but that negates the point of the sheet at all then.
I was not sure how else to go about it trying to lock it into that place. Also, I was not sure how to upload as a MARKDOWN text table so I figured an image would suffice for the problem.

Reorganizing Google Sheets data dynamically

I'm currently working with Google Sheets to import data from Contact Form 7 in Wordpress. All the data is coming over fine, but I wanted to see about formatting it in more user friendly fashion. I've simplified the example a bit, but the gist of the form I have created allows the user to request multiple versions of a graphic file with different wording as needed, up to 5(my example has just 2 for simplicity sake).
All the data is imported using the CF7 variables and ideally I wanted to clean this up a bit. What I had thought of as a solution was creating a second sheet that pulls in this data submitted in the first sheet into a more user friendly format, as I intended to use this as a work form for a designer to create the requested graphic once the data is received. With each request the name/department/email/date all stay the same, but I'd like to display the version and line 1 and 2 data on another line. Is it possible to reorganize data like this on the fly, so when a new form is submitted and adds data to sheet 1, sheet 2 would then update with the properly formatted info?
Is this even possible to do? I did some looking online, but didn't anything that really related to this type of data manipulation.
Solution:
Here's what ended up working for my example
=ArrayFormula(QUERY({
Sheet1!A2:D,Sheet1!E2:G,ROW(Sheet1!A2:A);
IFERROR(LEN(Sheet1!A2:D)/0),Sheet1!H2:J,ROW(Sheet1!A2:A);
IFERROR(LEN(Sheet1!A2:D)/0),Sheet1!K2:M,ROW(Sheet1!A2:A);
IFERROR(LEN(Sheet1!A2:D)/0),Sheet1!N2:P,ROW(Sheet1!A2:A);
IFERROR(LEN(Sheet1!A2:D)/0),Sheet1!Q2:S,ROW(Sheet1!A2:A)
},"select Col1,Col2,Col3,Col4,Col5,Col6,Col7 where Col5<>'' order by Col8",1))
Yes, it's possible.
One way is to use arrays and the QUERY function.
For simplicity, let say that
Columns A and B have the general information of the order
Columns C and D have the data for version 1
Columns E and F have the data for version 2
Columns G and H have the data for version 3
On the output sheet, add the headers.
Below of them add a formula like the following:
=ArrayFormula(QUERY({A2:B,C2:D,ROW(A2:A);IFERROR(LEN(A2:B)/0),E2:F,ROW(A2:A);IFERROR(LEN(A2:B)/0),G2:H,ROW(A2:A)},"select Col1,Col2,Col3,Col4 where Col3<>'' order by Col5"))
References start on row 2 to skip the headers to avoid to include them on the output sheet.
ROW(A2:A) is used to keep the order
IFERROR(LEN(A2:B)/0) is a "trick" used to "hide" the order (general information) data for the second and following rows for the same order. On the select parameter of the QUERY function, it's referrey as Col5 on the order by clause.
It's assumed that lookup-choice-1 will never be empty.
NOTES:
If more columns were added, the column numbers should be updated accordingly
Don't use the order by clause to sort the result by the general information columns because the "trick" to hide the "labels". If you need to apply a sort, do it' before applying the above formula, you could do this by sorting the source range through the Data > Sort range... feature, so the data is sorted before it's transformed by the above formula.
See also
Sort and filter your data, an official help article describing Data > Sort range...

Setting up default GridSortOrder with Vaadin8 and new Grid doesn't work

Our former solution based on Vaadin 7 Grid used multicolumn sorting. Data is sorted by backend database but we have to maintain visual infomation about sorting in column headers. Visualy it displays as small rectangles in column header.
Now with Vaadin 8 and new Grid, our data is, by default(by database), sorted by 'name' column so I'm defining default sort order for Grid using code as below. It seems to be straightforward but it doesnt show up on Grid. I can define GridSortOrder for one or two columns with no luck. Can't see anything on screen (in column headers). Any idea how to accomplish this properly?
List<GridSortOrder<Map>> orders=new ArrayList();
orders.add(new GridSortOrder<>(colName,SortDirection.DESCENDING));
grid.setSortOrder(orders);

Using CONCATENATE with Google forms and sheets

I have a survey going out with Google Forms, but to analyse the results, I would need to concatenate some cells. However, due to the nature of Google Forms, whenever a new response is recorded, a new row is added. I've read around, looking at different forums and tutorials, but can't seem to find anything that works.
Some of the places I've looked are:
concatenate column values for each row that gets added after google form submission
https://productforums.google.com/forum/#!topic/docs/0Os52U-0i1k
So what I would need help with is if it's possible to concatenate results from a Google Form without having to manually copy the formula in the cells whenever there are new responses. I've tried ArrayFormula, but I can't seem to get it to work. Any help would be much appreciated!
ArrayFormula(A2:A & B2:B) should do the trick.
Note that the formula will persist even if you put it directly at the end of the form and then add a new field.
It will just be shifted to the right, so you don't need to worry about taking care of that when you modify your form.
The CONCATENATE function is a Google spreadsheet function that combines two or more text strings into a single string. It appears in the dropdown menu for functions above cell A1, and when you select it, it places an =CONCATENATE()= formula in the selected cell.
Note that you may need to replace spaces with "&" if your text has spaces.
In order to perform this operation on Google Forms though, you will need to set up Form Embeds by making sure you have the input type of "google form embed." When embedded forms are enabled, there is no need for individual cells within a google sheet workbook with custom formulas next to each question result button as they're all being calculated.
You can find more info on CONCATENATE by referring to this.

Link columns so data updates are properly reflected

I have a column with data values and I want to link it to other columns in the same and different sheets but in the same spreadsheet. This is, having the same data in different columns in a spreadsheet while keeping all linked so updates on the source one would affect all of them.
I've tried with:
=SheetName!ColumnIndex:ColumnIndex
(e.g. =Sheet1!A:A) but, although it works, it is a cell reference not a column reference.
What is the best way to achieve it?
Maybe what you want is just the array version of what you have already tried:
=arrayformula(Sheet1!A:A)
(If not, please clarify!)

Resources