In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Malformed Function Call Error

sakinazarif
6 - Meteoroid

I'm trying to input IF formula in my alteryx workflow, however I keep getting a malformed function call error, can someone help

 

If (Length(Trim([ENTRY])) = 0 And Length(Trim([BATCH])) = 0) Or (([ENTRY] = "JRX" And [BATCH] = "2N")) Or (([ENTRY] = "JRX" And [BATCH] = "C1")) Or (([ENTRY] = "PAL" And [BATCH] = "C5")) Then "Stock"
ElseIf Trim([ENTRY]) = "ADI" And Uppercase(Trim([BATCH])) = "AC"
Or Trim([ENTRY]) = "PAL" And Uppercase(Trim([BATCH])) = "2N"
Or Trim([ENTRY]) = "CR" And !IsEmpty(Uppercase(Trim([BATCH])))
Or Trim([ENTRY]) = "DIV" And !IsEmpty(Uppercase(Trim([BATCH])))
Or Trim([ENTRY]) = "JNL" And !IsEmpty(Uppercase(Trim([BATCH])))
Or Trim([ENTRY]) = "NRT" And !IsEmpty(Uppercase(Trim([BATCH])))
Or Trim([ENTRY]) = "PRN" And !IsEmpty(Uppercase(Trim([BATCH])))
Or Trim([ENTRY]) = "REI" And !IsEmpty(Uppercase(Trim([BATCH])))
Or Trim([ENTRY]) = "RTC" And !IsEmpty(Uppercase(Trim([BATCH])))
Or Length(Trim([ENTRY]) = 0 And Length(Trim([BATCH]) != 0 AND !Contains([BATCH], "OD") Then "Dividend"
ElseIf Trim([ENTRY]) = "INT" Then "Distribution"
Else If Trim([ENTRY]) = "PAL" And Trim([BATCH]) = "A3" or ([ENTRY] = "PAL" And [BATCH] = "MC")
Then "Sec Fees" Else ""
Endif
Endif
Endif
Endif

4 REPLIES 4
lwolfie
11 - Bolide

Length(Trim([ENTRY]) is missing a closing )

sakinazarif
6 - Meteoroid

closed it, but I still have the error - what am I missing?

 

If Length(Trim([ENTRY]) = 0) And Length(Trim([BATCH])) = 0 Or ([ENTRY] = "JRX" And [BATCH] = "2N") Or ([ENTRY] = "JRX" And [BATCH] = "C1") Or ([ENTRY] = "PAL" And [BATCH] = "C5") Then "Stock"
ElseIf Trim([ENTRY]) = "ADI" And Uppercase(Trim([BATCH])) = "AC"
Or Trim([ENTRY]) = "PAL" And Uppercase(Trim([BATCH])) = "2N"
Or Trim([ENTRY]) = "CR" And !IsEmpty(Uppercase(Trim([BATCH])))
Or Trim([ENTRY]) = "DIV" And !IsEmpty(Uppercase(Trim([BATCH])))
Or Trim([ENTRY]) = "JNL" And !IsEmpty(Uppercase(Trim([BATCH])))
Or Trim([ENTRY]) = "NRT" And !IsEmpty(Uppercase(Trim([BATCH])))
Or Trim([ENTRY]) = "PRN" And !IsEmpty(Uppercase(Trim([BATCH])))
Or Trim([ENTRY]) = "REI" And !IsEmpty(Uppercase(Trim([BATCH])))
Or Trim([ENTRY]) = "RTC" And !IsEmpty(Uppercase(Trim([BATCH])))
Or (Length(Trim([ENTRY]) = 0) And Length(Trim([BATCH]) != 0 AND !Contains([BATCH], "OD") Then "Dividend"
ElseIf Trim([ENTRY]) = "INT" Then "Distribution"
ElseIf Trim([ENTRY]) = "PAL" And Trim([BATCH]) = "A3" or ([ENTRY] = "PAL" And [BATCH] = "MC")
Then "Sec Fees" Else ""
Endif
Endif
Endif
Endif

lwolfie
11 - Bolide

You still need to close the next Length  "Length(Trim([BATCH]) != 0"

sakinazarif
6 - Meteoroid

ahh voila! this works! thank you so much

Labels
Top Solution Authors