And/Or Expression help needed

The expression I am attempting to write should display an error message if the project due date is not blank and the project status equals "Not Started" or "Canceled".

 

My expression reads: 

AND((ISNOTBLANK([Project Due Date]),[_THIS]="Not Started", [_THIS]="Canceled")).

 

"THIS" = Project Status

 

Solved Solved
0 9 175
1 ACCEPTED SOLUTION

IF(
  ISBLANK([Project Due Date]),
  IN([_THIS], {"Not Started", "Canceled"}),
  IN([_THIS], {"In Progress", "Delivered"})
)

View solution in original post

9 REPLIES 9

Steve
Platinum 4
Platinum 4

thanks. I tried to delete this question.

Steve thanks for the link to the article.  I am still not achieving the outcome I desire from my expression.  My original query was wrong period.  The query I wrote using the article is still wrong solely based on the fact that it doesn't work but it is more accurate in pinpointing what data is valid.

I wrote the queries twice.  See below...one with the AND and one with just OR:

OR(([_THIS]="Not Started,ISBLANK([Project Due Date])),([_THIS]="In Progress",ISNOTBLANK([Project Due Date])),([_THIS]="Delivered",ISNOTBLANK([Project Due Date])),([_THIS]="Canceled",ISBLANK([Project Due Date])))




OR(([_THIS]="Not Started,AND(ISBLANK([Project Due Date]))),

([_THIS]="In Progress",AND(ISNOTBLANK([Project Due Date]))),

([_THIS]="Delivered",AND(ISNOTBLANK([Project Due Date]))),

([_THIS]="Canceled",AND(ISBLANK([Project Due Date]))))




My error message is below and was the same both times: 

Expression 'OR(([_THIS]="Not Started,ISBLANK([Project Due Date])), ([_THIS]="In Progress",ISNOTBLANK([Project Due Date])), ([_THIS]="Delivered",ISNOTBLANK([Project Due Date])), ([_THIS]="Canceled",ISBLANK([Project Due Date])))' was unable to be parsed: Number of opened and closed parentheses does not match.

I have counted

I've tried a third way now with no success...what am I doing wrong?

 

OR((AND(([_THIS]=”Not Started”),(ISBLANK([Project Due Date])),AND(
([_THIS]=”In Progress”),(ISNOTBLANK([Project Due Date])),AND(([_THIS]=”Delivered”),(ISNOTBLANK([Project Due Date])),AND(([_THIS]=”Canceled”),(ISBLANK([Project Due Date]))

AND(
  ISNOTBLANK([Project Due Date]),
  IN([_THIS], {"Not Started", "Canceled"})
)

You are using the commands wrong. AND() and OR() both are commands not operators. Also, what are all these parentheses for?

You should invest time in reading the documentation carefully and understanding how the expressions are constructed. 

To answer your question about the parentheses, my original question was wrong.  I tried to delete/edit. Not how this forum works.

Thanks for your response.  However it is based on my original expression/question.  Appreciate the feedback though.

IF(
  ISBLANK([Project Due Date]),
  IN([_THIS], {"Not Started", "Canceled"}),
  IN([_THIS], {"In Progress", "Delivered"})
)

Thanks.  I will definitely invest more time in understanding AppSheet.

Welcome! It is definitely worth it my friend.

Top Labels in this Space