Alteryx Designer Desktop Discussions

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

Update Value with Formula

swhitmeyer
8 - Asteroid

Hi, I am getting a parse error when I am trying to update this formula (\2017\03-March\VALIDATE CASH 03-31-2017.xlsm)  into Alteryx Action tool- see formula below.

 

"\"+tostring([#1])+"\"+tostring([#2])+"\VALIDATE CASH "IF +tostring([#3])+ = ‘Q1’ THEN ‘03-31’ ELSEIF +tostring([#3])+ = ‘Q2’ THEN ‘06-30’ ELSE ‘ERROR’ ENDIF"-"+tostring([#1])+".xlsm|CMLReinsured $"

 

13 REPLIES 13
Joe_Mako
12 - Quasar

How about something like:

 

"\" +
tostring([#1]) +
"\" +
tostring([#2]) +
"\VALIDATE CASH " +
IF tostring([#3]) = "Q1"
THEN "03-31"
ELSEIF tostring([#3]) = "Q2"
THEN "06-30"
ELSE "ERROR"
ENDIF +
"-" +
tostring([#1]) +
".xlsm|CMLReinsured $"

joshuaburkhow
ACE Emeritus
ACE Emeritus

swhitmeyer,

 

Joe has it cleaned up nicely but just for learning...you have operators in the wrong places and two in a row a couple times. If you look after both the "tostring([#3])" parts you'll see a "+" and a "=". Also the other piece is after "\VALIDATE CASH ".... you go straight to "IF" where you need a "+" right before it :)

 

Hope this is useful!

Joshua

Joshua Burkhow - Alteryx Ace | Global Alteryx Architect @PwC | Blogger @ AlterTricks
swhitmeyer
8 - Asteroid

Thanks! Now I am having an issue with ELSE -

 

"+ IF tostring([#2]) = "Q1" THEN + tostring([#1])-1 + ELSE =tostring([#1]) ENDIF + "\12-December\swhitmeyer Reserves_Dec16.xlsx”

Joe_Mako
12 - Quasar

how about:

 

"+ IF tostring([#2]) = "Q1" THEN + tostring([#1])-1 + ELSE tostring([#1]) ENDIF + "\12-December\swhitmeyer Reserves_Dec16.xlsx”

swhitmeyer
8 - Asteroid

I tried that, I am still getting the ELSE parse error :(

 

Joe_Mako
12 - Quasar

"IF tostring([#2]) = "Q1" THEN tostring([#1])-1 ELSE tostring([#1]) ENDIF + "\12-December\swhitmeyer Reserves_Dec16.xlsx”

JessicaS
Alteryx Alumni (Retired)

Hello,

 

This post has been moved to 'Data Preparation & Blending' from 'Welcome to Community' for greater visibility.

 

Thanks!

Jess Silveri
Manager, Technical Account Management | Alteryx
swhitmeyer
8 - Asteroid

Thank for the quick response! The full formula may help - I am getting a Parse Error at char(0): An operator must be between operands

 

"\\mmdata\Palm\" IF tostring([#2]) = "Q1" THEN + tostring([#1])-1 + ELSE tostring([#1]) ENDIF + "\12-December\WiltonRe Reserves_Dec16.xlsx"

Joe_Mako
12 - Quasar

"\\mmdata\Palm\" + IF tostring([#2]) = "Q1" THEN tostring(ToNumber([#1])-1) ELSE tostring([#1]) ENDIF + "\12-December\WiltonRe Reserves_Dec16.xlsx"

Labels