Malformed Function Call
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
What does this error mean? How do I fix it?
Solved! Go to Solution.
- Labels:
- Parse
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi,
I think you miss ) after the contains function.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
HI @Kwaku_Od - that error means the syntax of one of your expressions is incorrect.
For your specific case, the syntax would be
If Contains([State], " Virginia")
etc.
with a closing parenthesis after the string you're checking for in the [State] field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you! It worked. Is there a way to change smart quotes to straight ones after you have entered the text?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Do you mean in the data field? That would be as follows (for closing smart quotes):
Replace([field], ' ” ', ' " ')
You'd need to make a second expression for the opening smart quotes.
If instead you mean within the expression editor itself, the quickest way is to edit the XML of the workflow itself. Open the workflow file in a text editor to expose the raw XML directly, then do a find-replace in there. While it's not likely that smart quotes exist anywhere else in the XML as part of a tag, you'll still want to be careful about examining each "hit" on a smart quote lands on to verify that it's part of your expression and not part of the XML itself.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I put in the brackets but I'm getting an if error code. doesn't else come after the if in the if- function chain?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You'll need an ELSEIF keyword.
Check out the syntax at https://help.alteryx.com/20213/designer/conditional-functions
More specifically:
IF c THEN t ELSEIF c2 THEN t2 ELSE f ENDIF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @Kwaku_Od
I know this usecase has been already solved. Here is my take on it, looking at the very lengthy list of state names its best suitable to use find and replace tool.
Workflow:
Advantage: It's easy to maintain and update the list.
Resource on Find and Replace tool: https://community.alteryx.com/t5/Interactive-Lessons/VLookUps-with-Designer/ta-p/80201
Hope this helps : )
