I have a log table with a Status column and would like to get the Status for the users’ last entry but can’t figure out the formulas to use. Any suggestions?
Click through this link:
[FAQ: FILTER(), LOOKUP(), MAXROW(), MINROW(), REF_ROWS(), and SELECT()](https://community.appsheet.com/t/faq-filter-lookup-maxrow-minrow-and-select/24216/5) Tips & Tricks ?
How do I get a column value from the last row of this thing only? LOOKUP( MAX( SELECT( My Table[_ROWNUMBER], ([_THISROW].[Thing] = [Thing]) ) ), “My Table”, “_ROWNUMBER”, “Wanted Column” ) Replace My Table with the name of the table from which you want the column value; Thing with the name of the column containing a value that identifies the thing you want (e.g., Order ID); and Wanted Column with the name of the column whose value you want. See also: MAX()
Thanks Steve. I don’t think I explained the situation correctly.
I’m trying to write a formula for an Action behavior to NOT display if a condition is True. Specifically, if a user is “Checked In” to a Job then he cannot check in to another Job until he “Checked Out” of the current job he he is checked into.
I tried Lookup(UserEmail() , “Issued”, “Assigned Email” , “Status” ) <> “Checked In” but when I test it I get Y results for all rows in the table even when there are “Checked In” values in some rows and I don’t understand why.
What I understand is you want the action button available only if the user is not checked in to any other job:
ISBLANK(
FILTER(
"Issued",
AND(
(USEREMAIL() = [Assigned Email]),
("Checked In" = [Status])
)
)
)
FILTER(...) gathers all rows for the user with a Checked In status. ISBLANK(...) asks the question, were no rows gathered? If no rows were gathered, it means there were no rows for the user with a Checked In status.
I tried many different expressions with no luck. Some error messages I got were to do with sub expressions being, it seems incompatible. Is there a resource where I can reference those kinds of issues?
I appreciate all the help you’ve given: Thanks.
Is there a rule as to when the column referenced in formulas is on the right side of an expression vs the left side? Or does it matter?
BobG:
Is there a resource where I can reference those kinds of issues?
That’s what this community is here for! Screenshots of the error messages will help us help you.
BobG:
Is there a difference or rule as to when the column referenced in a formulas is on the right side of an expression vs the left side?
The = and <> operators will always evaluate as TRUE if the value on the left side is a blank value, regardless of the value on the right side:
-
"" = "hello"incorrectly TRUE -
"hello" = ""correctly FALSE -
"" <> ""incorrectly TRUE
I recommend trying to structure your = and <> expressions so a value you know won’t be blank is on the left side.
I didn’t realize that. Thanks for the tip.