I am new to neo4j and I am working on PoC. I succeeded in adding nodes and relations using import queries. But I can't find Rows tab to view query result data in tabular format. I can see Tabs Graph, Table, Text and code. I want Rows option also available in tabs. Please let me know if I have missed anything
What you are seeing is the way the browser is designed to work. The Table tab is returning your results in a tabular format. However, if a table column's value is a map (or a node or relationship), then the values in that column will be presented as a map (which looks like a JSON object). Also, if a column's value is a list, it will be presented as an array. Scalar column values (like numbers and strings) will be presented more in the way that you were probably expecting.
So, for example, the Table tab for the result of this query:
RETURN {a:1, b:2} AS map, [1,2,3] AS list, 123 as number, "abc" as string;
would look like this:
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).
Reference/test sheet: https://docs.google.com/spreadsheets/d/1fp6ZTBtgb5E0J9GKOqh8Ae47OzY1smec5ha9BfUfAsY/edit?usp=sharing
I have a Google Sheets document with one sheet (calculator) that pulls some values from another sheet (database). database is organized by two columns: make, and model. I use some weird data validation and helper columns to make dropdowns in calculator. Then I use filter() to pull the matching value from database.
This all works fine but it will be a calculator that gets reused and the data discarded, so I need only a finite number of rows in calculator (10-20). For this, it would be super nice to be able to select the whole row and hit delete to clear the calculation without destroying all the formulas. Ideally, the filter() would happen inside an arrayformula() in a hidden and protected top row to allow the rows to be easily cleared.
For some reason though, I can't get that to work. vlookup() is not an option because I need to match two keys.
On another note, it would be nice to not need the helper columns B:J and the data validation unique to each row. This is workable though as I only need a few rows. In the actual version I hide and protect B:J and there are many more columns there.
I know you said Vlookup() wouldn't work because you need to match on two keys, I think that vlookup() will help in this situation. Try this formula...
=arrayformula(Vlookup(A3:A&K3:K,{database!A$2:A&database!B$2:B,database!C$2:C},2,False))
The concept here is to put those two matches you need into one unique key. So we use the curly brackets {} to build an array within the formula and combine those two lookup fields in your 'database' sheet. So the columns of A and B become concatenated into one element, and the second part of that array is the column C which you need.
To lookup then just combines your A&K columns similarly, so it can lookup that combined element. The rest of the vlookup follows as normal. I.e. we look up this concatenation against that one and when it matches it returns the second column of the array we built, in this case database!C.
I don't think I'm clear on your columns B:J, so I'm not sure if this helps you with that as well.
You can't get rid of the helper column approach, as long as you want the calculator to use drop down selection for the model. Data validation for dropdowns requires either a list of values, ie. static, so no good, or a range of cells.
What you might want to do is to put those cells in a totally separate tab, eg. DataValidation, and then hide that tab. Your Calculator sheet will then be cleaner, with no hidden columns. Column K will use for data validation the "hidden" values, formerly columns B:J, that are now built off in the DataValidation tab.
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 scenario to verify the Sort&Filter functionality for Mobile App in Android.
Scenario:
Search for Item
Search Result Apper
Sort&Filter with some criteria
Have to Verify that Sort&Filter is applied correctly
Here results are added to RecyclerView.
As per RecyclerView/appium functionality, all the items are not loaded into view. Only visible Items are loaded into the view Hierarchy.
When I scroll Up the Linear Layout Indexes are re-arranged. I could not able to get all the Items.
Could you kindly provide me any sample scenario of this kind?
Or How can we achieve this kind of scenarios in Real Automation while working on the project?
Regards,
Shiva Oleti
Issue with Android as You stated is that it "sees" only what is visible on screen. I have similar issue, so I had to go deeper into element and fetch text. In your case I would do following:
1. Search Result Appear:
- fetch all visible elements, input search, fetch again -n results containing search result. Eg. if input 'beer' there should be eg. 4 elements with text containing "beer". Put elements in list and iterate:
List <MobileElement> listElements = driver.findElements(By.id("someId"));
for(MobileElement el : listElements){
if(el.getText().equalsIgnoreCase(expected)){
// do some validation //
}
}
Search Result Appear:
input exact value that will return unique, one result so You can easily count.
Sort&Filter with some criteria
remember initial values in items (text like 'Budweiser beer'), do some filtering / sorting, and check text in first element if is changed and if correct logic is applied (eg. sort desc.)
Have to Verify that Sort&Filter is applied correctly
think I answered in 3.
Basically:
'pick' text from items store them,
do some action (search, sort, filter),
'pick' newly changed items caused by 2. step, store them,
compare (depending on what You need...),
To get all items you have to swipe and store them in list.
I am trying to figure out if it is possible to use LOOKUP function that is based on a dyanmic value. For example:
=LOOKUP("A", C$2:C$1000, B$2:B$1000)
The above will look for Letter A in C Column and then write the value from the corresponding B Column row. What I wish to do is now read the Letter A from the D column, like so:
=LOOKUP(D2, Sheet2!C$2:C$1000, Sheet2!B$2:B$1000)
However, the above gives me an error. Is there a way to accomplish the above?
The above keeps returning me with an error saying value not found, I'm not sure what I am doing wrong.
EDIT
Ok so I have been playing more with this and I started having some very strange results. Lets take the following table: https://docs.google.com/spreadsheets/d/1ki3pmCOQoI1DLcbjEO-uwgwZGFfnHhM-fodspw8v1Qs/#gid=1001637055
Then my second sheet is this:
https://docs.google.com/spreadsheets/d/1ki3pmCOQoI1DLcbjEO-uwgwZGFfnHhM-fodspw8v1Qs/edit#gid=1993578337
If you look at the second sheet, bob shows up multiple times and I don't understand why.
Reason for #N/A's
lookup produces #N/A if it is looking up an empty range as is the case here. `'Draft Options'!A:A is empty so lookup cannot find a value to look up against.
Reason for multiple appearances
The documentation states that:
The LOOKUP function will only work properly if data in search_range or
search_result_array is sorted. Use VLOOKUP, HLOOKUP, or other related
functions if data is not sorted.
If search_key is not found, the item used in the lookup will be the
value that’s immediately smaller in the range provided. For example,
if the data set contains the numbers 1, 3, 5 and search_key is 2, then
1 will be used for the lookup.
Now, you are looking up Text but the same thing applies, it needs to be ordered alphabetically.
This is because lookup is doing something called binary search
Since your data is unordered and (assuming you have column A filled with keys the following can happen which leads to weird results:
Lookup looks at the middle entry and checks if the value comes before or
after the lookup value in an alphabetically sorted list.
If it comes
before it checks the the entry int he middle between the beginning
of the list and the middle.
If your entry happens to be in the latter half lookup never finds this entry
or
This value might not exists so it picks the first value it can find that would come before that (assuming the data is sorted) or something (seemingly random) where lookup finds value n to be alphabetically after the lookup value and n+1 alphabetically before and returns value n+1.
You should only use lookup if you know the lookup values will be there and that they will be sorted. Otherwise you might want to take a look at VLookup or Index Match
Solution
If Column A in Sheet Draft options Actually contains those letters you are looking up you can use a simple VLookup:
=VLOOKUP(F2, `Draft Options`!$A$2:$B$1000, 2, FALSE)
Here FALSE specifies that VLookup shall not use a binary search algorithm and instead go through the list linearly (i.e. one by one) which is slower but will retrieve the first matching value or throw an error if it is not there instead of returning something odd.