Join the Alteryx Community’s Maveryx Summer Cup event! Compete, network with others, and earn your gold through a series of challenges from July 24th to August 11th. Learn more about the event here.

Alteryx Server Discussions

Find answers, ask questions, and share expertise about Alteryx Server.

Getting parsing error on Alteryx server

hemal91
6 - Meteoroid

Hello,

 

I recently deployed one workflow to server and it's failing with parsing error. The workflow runs without error on my desktop.

 

Below is the logic and error message on server.

 

if datetimeformat(DATEADD(DateTimeToday(),-4,"Days"),"%Y-%m-%d") == [HOLIDAY] then DateTimeFormat(DATEADD(DateTimeToday(),-3,"Days"),"%Y-%m-%d") else DateTimeFormat(DATEADD(DateTimeToday(),-2,"Days"),"%Y-%m-%d") endif

 

if DateTimeFormat([hldy_adj],"%u") IN ("1","2","6","7") then DATEADD([hldy_adj],-3,"Days") else DATEADD([hldy_adj],-1,"Days") endif

 

DATEADD([tera_date_b],-1,"Days")

 

 

-----------------------------------------------------------------------------------

 

Error
278 Parse Error at char(18): Unknown function "DATEADD" (Expression #1)
Error
278 Parse Error at char(19): Unknown variable "hldy_adj" (Expression #2)
Error
278 Parse Error at char(62): Unknown function "DATEADD" (Expression #3)
Error
278 Parse Error at char(62): Unknown function "DATEADD" (Expression #4)
Error
278 Parse Error at char(18): Unknown function "DATEADD" (Expression #5)
Error
278 Parse Error at char(62): Unknown function "DATEADD" (Expression #6)
Error
278 Parse Error at char(54): Unknown function "DATEADD" (Expression #7)
Error
278 Parse Error at char(0): Unknown function "DATEADD" (Expression #8)

4 REPLIES 4
PanPP
Alteryx Alumni (Retired)

Hi @hemal91 

 

1) Does the server machine have access to the file that is being used in the workflow?

 - if not, I would recommend storing all files in a network location.

 

2) Did you mean to use the formula DateTimeAdd instead of DateAdd?

 

3) Is this a regular workflow or an analytic app?

 

 

Hope this helps.

TimN
13 - Pulsar

There is no such function DATEADD.  Maybe some one used the SDK and created it locally?  That's the only thing I can think of.  I see this for SDK info

 

https://help.alteryx.com/developer-help/build-custom-formula-functions

hemal91
6 - Meteoroid

Hi,

 

1) I am using the macro which is stored on shared network location and a text input which is statically mentioned in workflow.

2) It is a regular workflow.

PanPP
Alteryx Alumni (Retired)

The dateadd isn't a function. 

 

Can you provide a sample workflow with data that processes this formula tool?

 

Text input --> Formula tool example