Alteryx Designer Desktop Discussions

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

Parse Error at char(511): Parse Error (Expression #1)

KamenRider
11 - Bolide

Hi guys, 

 

I have this parse error when I added the <Img src> line since I would like to add an image to my email. Can someone determine how to fix the error? This involves the VBS script. Also I would like to ask how can I add this in the autoexec.bat to execute in the Alteryx?

 

Capture.PNG

Hoping someone to assist me on this.

 

Kamen

7 REPLIES 7
gawa
15 - Aurora
15 - Aurora

hi @KamenRider  A couple of possible causes are:

1) A part of strings are not properly  enclosed by single/double quotes. In your blue colored highlight, it contains single quotes and double quotes as a string. You can refer to the below discussion. 

https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/How-do-i-escape-a-single-quote...

2) You try to concatenate Numeric fields. If so, use ToString() function.  

 

KamenRider
11 - Bolide

Hi @gawa 

 

Is sample attached correct? I have changed it to double quote? 

 

Thanks

 

 

gawa
15 - Aurora
15 - Aurora

hi @KamenRider Like this. When you handle the string having single quotes ' and double quotes " being mixed up, you need to carefully escape them. For your ready reference, I attach WF.

 

image.png

gawa
15 - Aurora
15 - Aurora

BTW, if you wanna run .bat file in the stream of WF, try Run Command Tool. If you are new to this tool, please go to sample of this tool, and see how it works at first. This tool is a bit tricky one.

image.png

KamenRider
11 - Bolide

Hi @gawa 

 

Can you please screenshot you response (formula tool) so I can what is the difference. I tried downloading a trial version of Alteryx and it is asking for the license. I have no way to open the workflow outside.

 

Thanks,

 

Kamen

 

gawa
15 - Aurora
15 - Aurora

hi @KamenRider  Here you are.

'Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
Dim OutTable
OutTable = CreateObject("Scripting.FileSystemObject").OpenTextFile("'+[htmpath]+'").ReadAll()


On Error Resume Next
OutMail.To = "DISTRO" 
OutMail.CC = "' + [CC (Optional)] + '"
Outmail.BCC = "' + [BCC (Optional)] + '"
Outmail.SentOnBehalfOfName = "' + [From (optional)] + '"
Outmail.Subject = "' + [Subject] + '"
Outmail.Attachments.Add "' + [Attachment Location (Optional)] + '"

Outmail.HTMLBody ="<img src='+"'"+'\\xxx.com\xxx\xxx\600\OFFICE\xxx\xxx\Decks\PNG\xxx.png>"

Outmail.HTMLBody = OutTable

Outmail.Send

Set OutMail = Nothing

Set OutApp = Nothing'
KamenRider
11 - Bolide

Hi @gawa 

 

Thank you so much for the response. I no longer received the error. However the image is still not appearing. It give me a "red X" symbol instead of the image. Would you know why? Is there something missing in the code?

 

Red xJPG.JPG

 

I do hope you could still help me on this.

 

Thank,

Kamen 

Labels