I have a number field called Days and an editable names field called Names ( which allows multiple values ).
Let say that Days=1 and Names=Mike/Rock, Tom/Rock, Dean/Rock.
I want to display them in a column view like this:
1
Mike
Tom
Dean
I tried it with #NewLine, but no luck for me.
I also created a computed (hidden) field test with the following formula as default value:
#Text(Days)+#NewLine+#Implode(#Name([CN];Names);#NewLine)
It seems to be the wanted form for me, but when I just put test in a column default value, it shows nothing.
I appreciate your time.
Try to set your test field to #text(days):Names. This should create a multi-value field (as opposed to a single string which your test formula produces).
Then, set the multi-value separator of the column style to Newline, and adjust the number of rows to match the expected number of values.
In a view we get only one row for one document. Multiple values are therefore shown in one row only with multi value separator.
Eclipse view may perhaps help.
Related
In Google spreadsheets I use the following simple formula:
=QUERY({'pivot data source'!A:AN},"select * where Col1='2021-08' order by Col2")
This works fine so far. However, there is one comment column. It is empty for most rows. Now I added a comment there - it just won't appear in the result of the query formula.
I realized, that it works fine when the comment is a plain number. As soon as there is text, it won't show up.
As stated in the Google Help section for "query":
In case of mixed data types in a single column, the majority data type determines the data type of the column for query purposes. Minority data types are considered null values.
That means: As long as there are more values with numbers (numeric) than values with text (string), the rows with text will not show up. Even if there are as many numbers as text fields (e.g. one numeric value, one string), Google seems to define the column as numeric and strings don't show up.
To solve this problem, you can try to format the corresponding column in tab "pivot data source" as text (Format > Number > Plain text in the menu).
We are using Google Forms to collect data on our students. They use the same Google Form for all students, but as part of the form, they are asked the students name.
The data that ends up being collected you can see on the tab Form Responses 1 on the Google Sheet linked here.
I am attempting to use ImportRange to create a tab for each of the students. The formula that I am using for just one of the students is...
=QUERY(IMPORTRANGE("1nJANDP1fiQunxfxEf-EjwJrnIRICv6kLhYYY9XBXtD4", "Form Responses 1!A:I"),"SELECT * WHERE Col3 = 'Adam N.'")
You can take a look at the tab called Adam N. and you'll see it is kind of working.
One thing that doesn't seem to be working is when there is a text value in columns E-I, that text value doesn't end up showing on the Adam N. tab. Any ideas how I can get both the numbers and the text values to show up?
The other thing that seems to be a problem is the fact that on the Adam N. tab, the very first row has the same headers as the Form Responses 1 tab, but it also has the very first line of data. Any way to remove that?
Importrange is not needed since you are 'importing' from within the same spreadsheet. Also, I'd recommend using the (optional) header argument in query().
It is often noted that users are tempted to mix data types within a column. The query() function will give undesirable output. If a column is intended for numeric values then only numerical values must reside in that column. Date columns must only contain dates and text columns only contain text values.
This does not mean that numbers cannot appear in a text column as long as they are in a text format. So it is important to plan the columns in a table to make sure this rule is maintained regardless if the data table is created manually or via submissions from a Google Form.
Generally, the query() function will assume the greater number of cell types in a column to be that data type. For example, if there are 100 numbers and 20 text values in the same column then a numeric value will be assumed for that column. There is a good chance the text values will just be ignored. One way to avoid this, would be to convert everything to text.
See if this works
=ArrayFormula(QUERY(to_text('Form Responses 1'!A:I),"WHERE Col3 = 'Adam N.'", 1))
I have a column of numbers. I want to know if there are any duplicates. I don't need to know how many or what their value is. I just want to know if there are any.
The best way I could figure out was to have another column of equal height to the column of numbers, with the formula:
=countif(A:A,A1)>1
So this will put a TRUE next to every number that has one or more duplicates in the list.
From here I need to see if this second column contains a TRUE.
So I have a final cell with this formula in it:
=lookup(true, B:B)
This always displays FALSE, even when there are duplicates in the list, with corresponding "TRUE" values next to them in column B.
Also, is there a simpler way of solving this problem?
Note: I can get it to work if the single cell result simply does an =OR(B:B) but I still want to know why my first way won't work and if there is an all around simpler way of doing this.
you can use both =unique(A:A) and also =counta(unique(A:A))
note: the A:A is just a dummy array i threw in for example, replace with whatever column you want to refer to.
to get a final yes or no, you could nest it together by putting =if(eq(counta(A:A),counta(unique(A:A))),"No Duplicates", "Contains Duplicates")
I'm not sure whether simpler (I am confident the formula could be simplified!) but copy/pasting the following might be deemed so:
=sum(if(ARRAYFORMULA(countif(A:A,A1:A)>1),1,0))
This should return 0 only if there are no duplicates. If a single entry is repeated twice (three instances) and all other values are unique, the result should be 3.
TRUE is curious as the behaviour is not what I expected and I differs from Excel where true would be converted to TRUE, which normally indicates an automatic change from text to function. I don't have an explanation but it may be connected with lookup because the boolean behaves as I would expect in say an if formula.
I would like a script to delete columns in a Google Spreadsheet if the contents match a list of approximately 30 possible text strings. e.g. Custom Variable 1, Custom Variable 3, Custom Variable 9, etc.
I'm new to Google Scripts. I've searched this forum but haven't found a starting point that handles my specific situation -- deleting columns based on a list of string values rather than a single value or value input from a dialogue box.
Any help would be greatly appreciated.
Scott C
If I'm understanding what you're asking, you wish to read through a column and compare a list of values to the value in each row of that column. If that column contains any one of those 30 values, delete that column.
One way you could do it:
Hard code an array that contains all of those values you have in mind. Loop over the column you desire, storing each value into an array (So you would have two arrays total when you're done. One with the hard coded values, the other with the column values). Then, take those values from Array 2, and see if they match any of the words in Array 1. If one of those values matches your list, delete that column.
JSF-2.0 - specific row's(eg: 1st row) column value (eg: 2nd column of a row) need to be changed on change of other column value (eg: 1st column of a row)
I don't know if it is your question but if I understand correctly you probably could render the other column contents based on their id's. I do though think that you need the whole id of the rendered component including the row number of the id. Otherwise just render the whole table.
PLease confirm if this was the question and if this actually functions...