Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Parse error at Char: Using a Formula tool to write a Formula

bhagen009
5 - Atom

This is my input (there are more rows than this):

Expend Type NameExpend Type DescriptionExpend Type Parent CodeExpenditure CategoryExpenditure Item Code
Consulting - AdjustmentConsulting - AdjustmentContract Labor - ConsultingContract Labor - ConsultingContract Labor - Consulting

 

Below is my expected Output - Note: the column [ESTIMATE_CHARGE_TYPE] is not from my inputs - it is a column in my other workflow that I will be converting. 

Formula

ELSEIF [ESTIMATE_CHARGE_TYPE]='Consulting - Adjustment'

or [ESTIMATE_CHARGE_TYPE]='Consulting - Adjustment'

or [ESTIMATE_CHARGE_TYPE]='Contract Labor - Consulting'

or [ESTIMATE_CHARGE_TYPE]='Contract Labor - Consulting'

THEN [Expenditure Item Code]

 

I am trying to write an Alteryx formula (for a different workflow) by using the formula shown below in the screenshot:
Char Error.JPG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Here is the Formula from the screenshot, typed out: 
'ELSEIF [ESTIMATE_CHARGE_TYPE]=' [Expend Type Name]
' or [ESTIMATE_CHARGE_TYPE]=' [Expend Type Description]
' or [ESTIMATE_CHARGE_TYPE]=' [Expend Type Parent Code]
' or [ESTIMATE_CHARGE_TYPE]=' [Expenditure Category]'
THEN [Expenditure Item Code]'

 

Problem

However, I get the "Parse Error at Char" error. I have tried changing the data types to string, but that did not fix the error. 

 

I have attached the workflow package file to aid troubleshooting. Please let me know if you can think of something else I should try. 

1 REPLY 1
RishiK
Alteryx
Alteryx

@bhagen009 you are getting this error because the Expression Editor in a Formula tool will validate the expression and your one is not valid requiring a proper IF ELSEIF ELSE structure.

 

Why do you not want to create the formula in the actual workflow itself as opposed to creating it in a different workflow?

Labels