Announcements
This site is in read only until July 22 as we migrate to a new platform; refer to this community post for more details.

BOT Scheduled with for each row disable

Hi,

I need your help.

I have a scheduled bot with the "For Each Row" option disabled. The bot is used to send daily notifications. It uses the following formula to trigger the event:

OR(
COUNT(
SELECT(
claim[id],
[status]="Overdue"
)
) <> 0,
COUNT(
SELECT(
variation[id],
[status]="Overdue"
)
) <> 0,
COUNT(
SELECT(
expense[id],
[status]="Overdue"
)
) <> 0,
COUNT(
SELECT(
claim[id],
AND(
[status]="Pending",
TODAY() = [date] + 3
)
)
) <> 0,
COUNT(
SELECT(
variation[id],
AND(
[status]="Pending",
TODAY() = [date] + 3
)
)
) <> 0
)

The bot is not running correctly because I still receive notifications even though there is no data that satisfies the condition [date]+3=TODAY() in the variation or claim tables. I believe there is something wrong with the formula in this part. Could you please assist me in resolving this issue?

COUNT(
SELECT(
claim[id],
AND(
[status]="Pending",
TODAY() = [date] + 3
)
)
) <> 0,
COUNT(
SELECT(
variation[id],
AND(
[status]="Pending",
TODAY() = [date] + 3
)
)
) <> 0

Thank you so much for your assistance.

0 2 124
2 REPLIES 2

How are the  [date] columns defined in both tables?  If they are NOT Date, then use the DATE() function like this:  TODAY() = DATE([date]) + 3

I would suggest to use "> 0" instead.  It is more precise and can eliminate any unexpected results - e.g. it is common for some functions to return -1 to indicate an error or not found.  Plus, counts of something cannot be negative so I am not really sure how AppSheet handles the test of a COUNT() function against <> 0. 

[date] is a date-type column. Thank you for your suggestions, Sir

Top Labels in this Space