Alteryx Designer Desktop Discussions

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

Parse Error at char(35): Parse Error

kimberlyka
7 - Meteor

parse error.PNG

I keep receiving this error message and I'm not sure what the fix is.

Please advise! Thank you.

9 REPLIES 9
carlosteixeira
15 - Aurora
15 - Aurora

Hi @kimberlyka you need put 'OR' after any expression, like this

[Field1]='A' OR [Field1]='B' OR [FIELD1]='C' etc etc etc

Carlos A Teixeira
kimberlyka
7 - Meteor

After applying 'OR'

[COUNTERPARTY_CATEGORY] = "3rd_Pty"OR [COUNTERPARTY_CATEGORY] = "Interco_Non-IHC"
OR[COUNTERPARTY_CATEGORY] = ' '
OR[TEMPLATE_NAME] = "Derivatives"
OR[TEMPLATE_NAME] = "Other_Assets_Liab"
OR[TEMPLATE_NAME] = "Banking_Book_Securities"

 

I now receive "Parse Error at char(26): An operator must be between operands"

carlosteixeira
15 - Aurora
15 - Aurora

Can you share your workflow?

Carlos A Teixeira
jrgo
14 - Magnetar

@kimberlyka 

 

I think you just need to add a SPACE after each OR operator (and before).

 

[a] = [b] OR [b] = [c]  <-good

[a] = [b]OR[b] = [c]  <-bad

 

 

kimberlyka
7 - Meteor

kimberlyka_0-1577466200930.png

I tried to do it this way but it didn't work either but before this it was:

 

[COUNTERPARTY_CATEGORY] ="3rd_Pty" OR " [COUNTERPARTY_CATEGORY]="INTERCO_NON-IHC" OR [COUNTERPARTY_CATEGORY]=" " AND[TEMPLATE_NAME]="DERIVATIVES" OR [TEMPLATE_NAME]= "OTHER_ASSETS_LIAB"

jrgo
14 - Magnetar
[COUNTERPARTY_CATEGORY] ="3rd_Pty"
OR
[COUNTERPARTY_CATEGORY]="INTERCO_NON-IHC"
OR
[COUNTERPARTY_CATEGORY]=" " 
AND
[TEMPLATE_NAME]="DERIVATIVES"
OR
[TEMPLATE_NAME]= "OTHER_ASSETS_LIAB"

 

Try the above out. Your original had an unnecessary " after the first OR and there was also an AND operator that was missing a space afterwards.

carlosteixeira
15 - Aurora
15 - Aurora

@kimberlyka 

If I only put one option does it work?

[COUNTERPARTY_CATEGORY] ="3rd_Pty"

Carlos A Teixeira
fmvizcaino
17 - Castor
17 - Castor

Hi @kimberlyka ,

 

As @jrgo said, the only problem are the spaces between your AND OR logics. I have only added a space after your AND and also an additional quote.

 

[COUNTERPARTY_CATEGORY] ="3rd_Pty" OR [COUNTERPARTY_CATEGORY]="INTERCO_NON-IHC" OR [COUNTERPARTY_CATEGORY]=" " AND [TEMPLATE_NAME]="DERIVATIVES" OR [TEMPLATE_NAME]= "OTHER_ASSETS_LIAB"

 

Best,

Fernando Vizcaino

jrgo
14 - Magnetar

You may also need to group your conditions. Mixing an AND with an OR without grouping may not work as intended. Here's an example:

 

[COUNTERPARTY_CATEGORY] ="3rd_Pty"
OR
[COUNTERPARTY_CATEGORY]="INTERCO_NON-IHC"
OR
[COUNTERPARTY_CATEGORY]=" " 
AND
(
	[TEMPLATE_NAME]="DERIVATIVES"
	OR
	[TEMPLATE_NAME]= "OTHER_ASSETS_LIAB"
)

 

Labels