Yes/no expressions

I’m confused by it I know its most definitley simple but I just don’t understand why its doing this. When I do a yes no expression I get the opposite results of what im expecting. im using the expressions for a bot in my app

AND([DateStatus]=“Accepted”,[Users].[role]=“Customer”)

What Im looking for it to do is send out a notification when column datestatus has been changed to Accepted and that the user that initiated the original post has to have the role of customer for them to receive the notification.

but even if I have Customer and Accepted in the columns it gives me false. If I remove the customer and accepted and just leave quotes in the expression it gives me true. Im just confused with it if anyone has some ideas of what im doing wrong it would be greatly appreciated.

Hello there @Riconstruct , please correct me if I’m wrong, but here’s what I’m going to assume:

  1. You want a notification sent to someone when the dateStatus becomes accepted and if the user who originally created the row has the role of customer.
  2. [Users] is a REF column in the table that should trigger the automation which has a reference to the person that created the row NOT the person that accepted it, and probably has an expression as an initial value in order to do so.
  3. Both the “Accepted” and “Customer” strings are written in exactly the same way in both the tables and the expressions.

If all these assumptions are correct, please try this expression instead:

AND(
[_THISROW_BEFORE].[DateStatus]<>[_THISROW_AFTER].[DateStatus],
[_THISROW_AFTER].[DateStatus]=“Accepted”,
[Users].[role]=“Customer”
)

  1. Yes thats correct.

  2. Yes users is a ref column in that table

when trying the expression its giving me false readings on my expression(last picture)

I see you’ve tested the expression, but did you try it out?

Also, can you share the column configuration for both the “Users” and the “DateStatus” columns from the “Schedule” table?

Yes tried it out and didnt receive a notification but executed both and the bot did what I wanted just doesnt look like its getting triggered from the expression. here is the table setup of Users and Schedule

@Riconstruct but your [Users] column is empty, who is it going to notify then? you should inspect that column closely, if you don’t allow users to edit it set its editable_if to FALSE instead of just leaving the checkbox unchecked.

EDIT: The expression fails because [User].[Role] is blank because [User] is blank

1 Like

Ahh I see I was having trouble for some reason USERNAME() is not working for me in that table but I was assuming the [Users].[role] would draw the information from my Users table not from the Users column in the Schedule table. If I fill out the Users area of the table with the correct information , the expression should run would that be a way for me to test if that is my problem? btw thank you so much for the information I truly appreciate it.

I see, you should implement a current user system, that way you can fill your [Users] column with just an initial value of USEREMAIL() and then the system will take care of the rest, once that’s solved it should work without problems.

I’m going to try and sort the user system out and go from there I appreciate you’re help.

1 Like

No problem, if you have an issue with that you can create another question and tag me and I’ll swoop in to give you a hand.

1 Like