Variable images work in designer but not in workflow

Can print from designer with no issues but when using workflow I get none of the images. Feels like I am missing something easy. (running both the designer and workflow from the same computer/login)

script in the template looks like this:

var field = record.fields[“Back Image”];
var basePath = “file:///C:/Clients/backgroundfiles/”;
var src = “”;

if (field && field.trim() !== “”) {
src = basePath + encodeURIComponent(field.trim());
results.attr(“src”, src);
} else {
results.attr(“src”, “”);
}

Are you testing in Workflow wth the exact same file as in the Designer?

Yes. On same server with same account etc.. version 2025.1.1 if that makes any difference.

Best you open a technical support ticket through our website.

Thanks. I’ll do that.

@rjungles, welcome to our OL Forum community!

[internal reference: #1889467]


Tip: Did you know that it is possible to format code wrapping it in three backtick characters as shown in the following example?

```
var field = “hello world!”;
```
Result:

var field = "hello world!";

turned out to be an issue with the service queue, support helped get it sorted. need trick with the encoding. I’ll give that a try.

1 Like