ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Parse error at char 121: Unmatched Expression

MikeFrancis1959
Asteroide

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 RESPUESTAS 5
cjaneczko
Púlsar

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
Asteroide

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
Púlsar

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
Magnetar

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

 

binu_acs
Polaris

@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

 

 

 

Etiquetas
Autores con mayor cantidad de soluciones