Multiple conditions in notification return invalid error

I tried with ; , space and new line.

Also second question, how could I use the day of the week as a condition? Like I want to send the notification only on week days and not weekends?

1 Like

When you want to add multiple conditions, you need to use and or or operator depending on your use case.

An example is shown below for 2 conditions using and operator.

doc.status == "Open" and doc.due_date == nowdate()

It’s not documented anywhere. That should be added to the documentation.

Regarding the second question, can we write some code in the condition box to figure out what day of the week we are?

1 Like

I am still getting error
The Condition ‘doc.status !=“closed” and doc.delivery_date < nowdate()’ is invalid

When i use == operator e.g( doc.delivery_date < nowdate()) it works . But when i use < operator it gives invalid

hi @zulfi007

Bear in mind that conditions are in Python and only the restricted Python API

Use frappe.utils.date_diff(doc.delivery_date, nowdate()) > 0


Thank you, I was using && like you would normally and couldn’t figure it out.