Hy,
Iโm sorry, I canโt find an expression to use in a formula, to do this very simple thing:
Return the value of Cell A2 from table โSheetโ?
So itโs not LOOKUP, itโs just getting the value of a cell, knowing the table name, the column letter and the row number.
Do you know it?
Thank you
Solved! Go to Solution.
In generally it would be like LOOKUP(2,โSheetโ,"_ROWNUMBER",โColumnNameโ)
Hmmm โฆ there is something Iโm not doing right.
So to explain, what I want is to write a formula for a notification workflow, for the email address to send the notification to. It sends it when a task is set to Urgent. But it has to send the notification to all the Team members that are responsible for the task.
Basically Send a Notification on a Priority Change of a Task, to all Team members Resopnsible for that Task.
So what I was thinking (and if there is an easier way please let me know ), was to have a formula something like this:
IF(CONTAINS([Team],LOOKUP(2,[Members],"_2",โNameโ)),LOOKUP(2,[Members],"_2",โEmailโ),"")
So
IF in the List of Names ([Team]) in the Task that has just changed itโs Priority to Urgent, there is also the first name (Row 2, Column โNameโ) from the Members table ([Members]):
LOOKUP(2,[Members],"_2",โNameโ)
, then, return his email:
LOOKUP(2,[Members],"_2",โEmailโ)
, if not than leave it blank.
If it works itโs fine for me for now because there arenโt many Members, so I can make such a rule for each member (same formula where I just change the Row Number to search for the next name in the column Name from the Members Table and so on) . However, if there were 100 Members, this method wouldnโt be so convenient anymore because โฆ there would be 100 formulas. So Iโm guessing there is another way to Send a Notification on a Priority Change of a Task, to all Team members Resopnsible for that Task.
So far, writing the formula as you suggest, doesnโt work, as it says:
Unable to find column _2
It doesnโt work because that formula needs โ_ROWNUMBERโ, not โ_2โ which is possible a column name.
Would you please open your table structure a little. Where these columns are and is there a relationship between these tables.
Iโm not sure I understand. What should go in โ_ROWNUMBERโ? I put "2 because I want it to look in the second row.
So the Team Column is a EnumList Reference to the Names in Members Table. Thatโs the link to populate the List of Team Members for a Task.
And the point is to make a Notification send to the Team Members of a Task that has just had a Priority change to Urgent.
So the question is what formula retrieves the Emails of the Team Members found within a list, associated to a task โฆ one by one. (or if the โToโ window of the Action from a Workflow accepts it, get all the emails, separated by a comma or something).
Put something like this in the โToโ section of the workflow:
Select(team_members[email], in([Team_Member_ID], [members]))
The idea here is that youโve got an enumlist that lists the team members for the task (holding the Key ref value for each team member in a list); so in your workflow you can add a formula like what Iโve got above into the โToโ section that looks at that list, then pulls all the emails of the people in that list.
Iโm sorry, I canโt really follow the formula.
So there is:
The table Members that has the columns Member_ID, Member Name, Member Email
And the Table Tasks that has the column Team that is an Enumlist referencing Member Name
Select(team_members[email], in([Team_Member_ID], [members]))
what is โteam_members[email]โ referencing?
[Team_Member_ID] would be Member name I guess, from Members Table โฆ but Iโm not sure if thatโs what you mean
[Members] would be the Member Table.
And this formula would retrieve all emails? (never really used Select before so I donโt know itโs logicsโฆ)
Does the โToโ field accept more than one email inside it?
Itโs a reference base type, to the Member Table where the key is the Name column
Yes. Is that an issue in any way?
Well, there is a column for names and one for nicknames. I reference the Nickname column which is the one I indicated (you will find Sorin there too, 'couse I use my name as a nickname โฆ) but anyway, thatโs not so importantโฆas long as I understand the formula, Iโll get the right column name.
Ok, Iโll play around with this until I get what I want. If it works, itโs already much simpler than what I was about to do.
But just so I know generally, how do you write the formula to get the value in cell A2 of table โSheetโ?
what is โ_Rownumberโ here?
Thank you
Whenever Iโm writing out a LOOKUP formula, I read it like this in my head (it might help guide you too):
LOOKUP(What to find, what table to look in, where to look, what I want)
LOOKUP(2, Table, _RowNumber, Column)
_RowNumber is the column where the value being looked up will be found.
With LOOKUP weโre saying:
But then why is โ2โ in the โWhat to findโ position? Iโm not looking for the value โ2โ. Iโm looking to get whatever Value is in the Google Spreadsheets Cell A2 (or B3 or C6 or whatever) in Table called โSheetโ โฆ
and why is โ_ROWNUMBERโ in the โyouโll find that value in this columnโ field โฆ
Maybe there is a misunderstanding due to talking in writing :)) but I donโt get it.
Oooh โฆ I think I got it now. Itโs a mindbender
the formula is saying - Look for (2, in table sheet, where 2 is the Rownumber, now give me the value in column - column name)
Right?
Nailed it.
Your original question was โHow can I get something from row 2, in column aโ - but we donโt do column letters in AppSheet, we use names.
So another way to say your original question would be: โHow can I get something from row 2 from the โSomethingโ column.โ
BUTโฆ
This is what youโre really asking about.
In order to solve THAT problem, youโll need to use the SELECT()
The โ_ROWNUMBERโ means it tries to find the value from row 2 as it is set in the LOOKUP formula. The LOOKUP is the same than ANY(SELECT(Sheet[ColumnName],[_ROWNUMBER]=2))
User | Count |
---|---|
16 | |
10 | |
9 | |
8 | |
3 |