Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Parse error at char 121: Unmatched Expression

MikeFrancis1959
8 - Asteroid

I keep getting an error message " Parse error at char 121: Unmatched Expression and I am not sure why. The error is right before the 2nd "Then" and I am not sure what is wrong with the syntax, can someone point out what I am doing wrong?

 

IF [1st GI]>"2022-12-31" AND [2nd GI]>"2022-12-31"
THEN "Delivered"
 
ELSEIF ([1st GI] > "2022-12-31" AND (ISEMPTY([2nd GI])
THEN "In Transit"
 
elseif
contains([1st GI],"ESD") AND (ISEMPTY([2nd GI]) OR Contains([2nd GI],"ETA"))
THEN "Planning TBD"
 
 
 
 
ELSE "NA"
ENDIF
5 REPLIES 5
cjaneczko
13 - Pulsar

Looks like a missing ")" before the THEN and an extra "(" before the ISEMPTY. You have 3 open Parenthesis but only 1 closing in that ELSEIF line.

 

Putting two ")" after the  (ISEMPTY([2nd GI]) should fix it.

 

IF [1st GI]>"2022-12-31" AND [2nd GI]>"2022-12-31"
THEN "Delivered"
 
ELSEIF ([1st GI] > "2022-12-31" AND (ISEMPTY([2nd GI])))
THEN "In Transit"
 
elseif
contains([1st GI],"ESD") AND (ISEMPTY([2nd GI]) OR Contains([2nd GI],"ETA"))
THEN "Planning TBD"
 
 
 
 
ELSE "NA"
ENDIF

 

 

MikeFrancis1959
8 - Asteroid

I tried adding the ")" before the THEN and still issue and then removed the "(" before the ISEMPTY and still did not work, still not sure where to go with this!

Mike

cjaneczko
13 - Pulsar

Copy the code pasted above and replace it. I was able to get the workflow to work by adding the two Parenthesis before the THEN. 

DavidSkaife
13 - Pulsar

Hi @MikeFrancis1959 

 

This code works, you shouldn't need to have the IsEmpty section within parenthesis;

 

 

IF [1st GI]>"2022-12-31" AND [2nd GI]>"2022-12-31"
THEN "Delivered"

ELSEIF ([1st GI] > "2022-12-31" AND ISEMPTY([2nd GI]))
THEN "In Transit"

elseif
contains([1st GI],"ESD") AND (ISEMPTY([2nd GI]) OR Contains([2nd GI],"ETA"))
THEN "Planning TBD"

ELSE "NA"
ENDIF

 

binuacs
20 - Arcturus

@MikeFrancis1959 Try the below formula

 

 

 

IF [1st GI] > "2022-12-31" AND [2nd GI] > "2022-12-31"
THEN "Delivered"

ELSEIF [1st GI] > "2022-12-31" AND isEmpty([2nd GI])
THEN "In Transit"

elseif
(contains([1st GI],"ESD") AND ISEMPTY([2nd GI])) OR Contains([2nd GI],"ETA")
THEN "Planning TBD"


ELSE "NA"
ENDIF

 

 

 

Labels