How to return most recent data based on google form response timestamp - google-sheets-formula

New here, but I've been wracking my brain over the last two days, and I haven't been able to figure out the solution.
I'm working on an Inventory Management tracker for personal use. I have an tab named "Index" with Columns "Item ID" and "Location", and the other tab would be the google response form with columns "Timestamp", "In/Out", "Item ID", and "Location".
I'm looking for a formula that will pull in the most recent location info from the Google response sheet, with a match to the Item ID.
I've tried filters, but keep getting a match error.
I'm open to Queries, but am very new to them, so will need some help coming up with what works best.

I dont know about google-sheets, but in excel you could add a unique key column to your Response table - eg =ItemID&"-"&TimeStamp
Then in your Items table find the most recent Timestamp for that Item with MAXIFS
Then use that most recent timestamp value for the item to to a vlookup using the Response.Key column to get the location

Related

Google sheets drop down with extra description - not dynamic

I'm trying to create a drop down picker that shows a list of values, but actually stores a related value.
The list I'm working with looks like:
ID Desc
AA An option
AB Different option
B3 Some other option
So I want the user to see the description, but the value stored when they have picked one is the ID column.
I've search a lot but can only find either simple data validation or dymanic (Multiple dropdows based on a prior drop down)
My users won't remember the ID's, but by having the text descriptions they will find it easier.
Any help please?
Lots of searching for clues, but can only find either simple single column drop downs, or dynamic.
Lets say, you want to select description id D7 cell then want to show result from J Column as per ID of selected description. Then Try-
=XLOOKUP(XLOOKUP(D7,B2:B4,A2:A4),I2:I4,J2:J4)

Insert a new Google Sheets row into Alphabetically Sorted spreadsheet

I am working with two spreadsheets; the first spreadsheet takes a name and then automatically adds it to the next spreadsheet which is sorted alphabetically by name. The problem is, I need a new row to be created, otherwise the data from the row above it gets added along with the name. Here is the query I am using: '=query(Referrals!A2:O, "select * where C is not null order by D")'. I don't think this can be done with a query, so I have been exploring Google App Scripts. I am not sure how to insert into the pre-sorted list, though. Any help is greatly appreciated!
Have you tried offsetting the header so you can run it for the range of the sheet?
=query(Referrals!A:O, "select * where C is not null order by D Offset 1")
That seems to fix some of the issues I've come across.
EDIT:
What about using a filter formula?
=sort(FILTER(offset(Referrals!$A:$O,1,0),offset(Referrals!$C:$C,1,0)<>""),4,true)
If using Apps Script, then you can directly insert a row (via Sheet.insertRows(rowIndex, numRows)) into the sheet at the desired index. But I believe you can achieve what you want by mapping the data in "next spreadsheet" to the names imported via "query" using VLOOKUP. That way when new data is added to "first spreadsheet" it will be sorted accordingly with your formula, but now the data associated will move rows to continue matching their respective row.

How can I use Google Sheets to keep a most recent announcement date for tickers I have?

I've got an extensive google sheet file, one of the sheets which are called "Ticker List" has a range of tickers on it. I would like there to be a column in that range which presents the date of the most recent announcement only (column "O"). The ticker symbol is in column "A".
Since I do not need the data to be backdated before today, I originally tried to create a importxml function, which goes to "today's announcements" on ASX website. URL: "https://www.asx.com.au/asx/statistics/todayAnns.do". Although the XPath confuses me.
None
I want the code to scan that website, if a ticker that is in my range (column A) has an announcement today, then to update column O to today's date, and keep that date there until the next announcement. The order of my current ticker range, is not update-able, although I do have a sheet in my file that is called "backend" and has a lot of queries and ranges to help sift through data.
You can create an auxiliary sheet that imports the whole table as rows.
Then you create an Apps Script function that reads this auxiliary sheet and updates the fields accordingly.
You then schedule that to run on a time-based trigger, every day.

Open formula doesn't return name

I have written open formula in Pentaho Report Designer 5.0.1 as:
=SINGLEVALUEQUERY("SELECT name FROM income_product where order_no=1";)
Rather than writing a query on data set and call from SINGLEVALUEQUERY() I want the string value from the above query.
PRD doesn't complain about the above formula as syntax error; it just returns null/nothing. What (if anything) is wrong in that formula?
I want to write that formula to generate dynamic column name for a report having order number 1 or greater. Is there any other way to make the column name dynamic for a report?
By "Dynamic column name", I mean making different organization have unique income_product_order.
If I just assign the order_no of income_product it automatically gets income_product_name as the column name for all organizations.
Did you set up your connection correctly? try adding a query over that connection and paste that query there. Does it return any data?
This is a good blog post on the subject: https://www.on-reporting.com/blog/using-queries-in-formulas-in-pentaho/
You can enable the "Display the index columns (...)" option under Settings. It'll allow you to reference columns either by name or by index (column0, column1, etc.)

Passing more than 3 items in a reports column link

I have a report that is listing students and I want a column to edit a student. I've done so by following this answer:
How do you add an edit button to each row in a report in Oracle APEX?
However, I can only seem to pass 3 items and there's no option to add more. I took a screenshot to explain more:
I need to pass 8 values, how can I do that?
Thanks!
Normally, for this you would only pass the Primary Key columns (here looks like #RECORD_NUMBER# only). The page that you send the person to would then load the form based on the primary key lookup only. If multiple users were using this application, you would want the edit form to always retrieve the current values of the database, not what happened to be on the screen when a particular person ran a certain report.
Change the Target type to URL.
Apex will format what to already have into a URL text field which magically appears between Tem3 and Page Checksum.
All you need to do is to add your new items and values in the appropriate places in the URL.
I found a workaround, at least it was useful to my scenario.
I have an IR page, query returns 4 columns, lets say: ID, DESCRIPTION, SOME_NUMBER,SOME_NUMBER2.
ID NUMBER(9), DESCRIPTION VARCHAR2(30), SOME_NUMBER NUMBER(1), SOME_NUMBER2 NUMBER(3).
What I did was, to setup items this way:
P11_ITEM1-->#ID#
P11_ITEM2-->#DESCRIPTION#
P11_ITEM3-->#SOME_NUMBER##SOME_NUMBER2#
Previous data have been sent to page 11.
In page 11, all items are display only items.
And P11_ITEM3 actually received two concatenated values.
For example, the calling page has columns SOME_NUMER=4 and SOME_NUMBER2=150
so, in pag1 11, P11_ITEM3 shows 4150
In page 11 I created a Before Footer process (pl/sql expression)
to set up new items, for example P11_N1 as source SUBSTR(P11_ITEM3,1,1)
and item P11_N2 as source SUBSTR(P11_ITEM3,2,3)
So, I had those items with corresponding values from the calling IR page.
The reason I did not pass the primary key only for new lookup access, is because i do not want to stress database performing new queries since all data are already loaded into page items. I've been an oracle DBA for twenty years and I know there is no need to re execute queries if you already have the information somewhere else.
These workarounds are not very useful for a product that bills itself as a RAD tool.
Just include a single quoted word in the select statement (Select col1, 'Randomword', col2 from table 1;)
Then define that column as a link and bingo! More items than 3 to select.

Resources