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).
Will this altered expression bring a difference?
Count(FILTER("Waitlist",
AND(
[_THISROW].[Parking Date] = [Parking Date],
[Site ID] = [_THISROW].[Site ID],
[Status] = "WAITLIST")
)
)>0
Thanks @Koichi_Tsuji I tried this one as well and it didn't work.
Sorry for little help.
I suggest you debug your expression by inserting it into VC for the table of "Waitlist" and check if each row returns the result what you expect.
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 |
---|---|
18 | |
14 | |
11 | |
7 | |
4 |