I am getting the following error when setting up an email task in iMIS TaskCentre:
Error while evaluating expression : Syntax error - {=<SPAN class=GramE>ThisStep.RecordSource(</SPAN>"Testing")}
This message is coming up during the HTML step of the task. What I am looking to do is add the Notes field from Meet_Master when there is a value in that field. Not all the events require any Notes, however, some do.
This is what I am doing:
In the Query step, I am pulling in the fields that are needed for the email task using SQL. For the Notes field I currently have the syntax as: cast(m.notes as varchar(8000)) as Testing. When I check the query, the data does show in the Results no problem.
I then added the field "Testing" from the Record Source fields in the HTML step and added in my SMTP step. Everything looks fine and I don't get any errors.
When I queue the task, the email is sent; I see in the the Event Log a warning with the error message in the Description: Error while evaluating expression : Syntax error - {=<SPAN class=GramE>ThisStep.RecordSource(</SPAN>"Testing")}
The email is sent no problem, just the Notes information is not there.
I also tried adding a variable to the task where if there was something in the Notes field to print it, otherwise leave it blank, but I still get the same message.
Any suggestions on what I should look at doing?
Thanks.
Nadine
Nadine, The problem is
Nadine,
The problem is almost certainly because the field link in the HTML document you are creating is malformed, in that it contains embedded HTML.
So rather than the "{=<SPAN class=GramE>ThisStep.RecordSource(</SPAN>"Testing")}" that you are getting, you should just have:
"{=ThisStep.RecordSource("Testing")}" without the quotes.
I cannot see how that embedded HTML got in there so you'll perhaps need to look behind the scenes at what is going on. You could try to delete the field link and place it again but check the generated HTML by right-clicking then View Source.
I hope this helps.
Paul Cannon
Fisher Technology