Skip to main content

Hi! I've been using Nintex for about 6 months and am even greener at HTML.

My workflow generates a task. The user uploads their findings as an attachment to the task and completes it. My workflow then uses the Call Web Service action in conjunction with a Query XML action and Build String action (to replace the spaces with %20) to get the URL of the task attachment. This URL ends up in a text variable called attachmentsURL_text. I end up with a splendid URL that works only when I insert the variable into the body of the notification. When I try to embed it into HTML, it doesn't work. You know, "click here to view the attachment" rather than some gangly URL.

My HTML:

<div>Click <span id="NWRTEReference1"><a class="ms-rtestate-write" contenteditable="false" onclick="selectThis(this);" href="javascript:void(0);" reftext="here" link="true" reflink="%7BWorkflowVariable%3AattachmentsURL_text%7D" link="false" style="text-decoration: underline; color: blue">here</a></span> to view the attachment.<br/>

Even though it shouldn't matter, I've tried replacing the code with the symbols (a { instead of %7B ) and, but that still doesn't work. I've also checked and unchecked the "Parse for tokens twice" in my Build String action and that didn't make a difference.

Here is a sample of what my URL looks like when I use the variable in the body of the notification:

http://test-company/sites/workflow/reviewsite/Lists/Workflow%20Tasks/Attachments/552/5th%20Item.docx

Any help would be appreciated.

Andrea Pasutti​, I just dropped your html into a "Send Notification" and it worked fine.  Can you provide some screen shots of your workflow and what you're seeing?


CORRECTION: This is the screen shot with the correct code. When I hover my mouse over the embedded variable that comes in my email, this is what it says:

embedded_variable.png

When I click that link, nothing happens. The attachment doesn't open. But it does when I click the URL below it (that's been edited for security, of course).


This is the notification body:

notification.PNG


Ok, I understand now.  I'm assuming you're inserting the variable using the "Insert Reference".  You want to use the ribbon and insert a link.  Then you can enter your variable with the url, and the text you want to display.  After it's inserted you can then view the html to see how it's setup.  This is what mine ended up as.

<div>Click

   <span id="NWRTEReference1">

      <a class="ms-rtestate-write" contenteditable="false" onclick="selectThis(this);" href="javascript:void(0);" link="true" reflink="{WorkflowVariable:attachmentsURL_text}" reftext="here" style="color: blue; text-decoration: underline;">here</a></span>&#160;to view attachment.<br/><br/><br/><br/>&#160;</div>

NWF_VariableURL_1.png

NWF_VariableURL_2.png

NWF_VariableURL_3.png


Ugh! So simple! Thank you so much! I will remember that next time! happy.png


Reply