In a bot with "Branch on condition" expression the following works
COUNT(LIST(INDEX(TOP(ORDERBY(FILTER("Waitlist", AND(
[Site ID] = [_THISROW].[Site ID],
[_THISROW].[Parking Date] = [Parking Date],
[Status] = "WAITLIST")),
[Request Date], FALSE
), 1),1).[Booking ID])) > 0
but a simpler form of the same expression doesn't work as expected. The objective is to check if we have any entries in the waitlist.
ISNOTBLANK(FILTER("Waitlist",
AND(
[_THISROW].[Parking Date] = [Parking Date],
[Site ID] = [_THISROW].[Site ID],
[Status] = "WAITLIST")
)
)
Solved! Go to Solution.
AppSheet does not support this construct:
You cannot dereference an intermediate value; you can only dereference a column value directly.
Dereference expressions - AppSheet Help
Here is you first expression, reformatted for my clarity:
COUNT(
LIST(
INDEX(
TOP(
ORDERBY(
FILTER(
"Waitlist",
AND(
[Site ID] = [_THISROW].[Site ID],
[_THISROW].[Parking Date] = [Parking Date],
[Status] = "WAITLIST"
)
),
[Request Date],
FALSE
),
1
),
1
).[Booking ID]
)
)
> 0
LIST(INDEX(TOP(..., 1), 1) is exactly equivalent to TOP(..., 1).
User | Count |
---|---|
15 | |
12 | |
9 | |
8 | |
4 |