Dynamically Generated Hyperlinks

Document created by eharris04 Employee on May 9, 2016Last modified by eharris04 Employee on Jun 9, 2016
Version 5Show Document
  • View in full screen mode

How to have links to documents in a Nintex Task Form that was created in Office 365.

 

AuthorVadim Tabakman
Long Description

I did figure out a workflow and you can see it in action in the video below.  I'll also talk about it under the video and the workflow is downloadable in the Downloads section below. This process requires both Nintex Workflow and Forms for Office 365.  The form in this example is just for the task action (Assign a Task).  I think going through all the bits here is just doubling up as I've described what the steps are in the video.

Dependencies

There are a few requirements for this to work.

 

 

1. Create a field in your initial list to hold a semi-colon delimited list of urls

 

 

2. Add a Rich Text control to your Task form and give it a CSS class like "cssHyperlinks"

 

 

3. You should have a Single line of Text control on your task form, connected to your field from Requirement 1 above.  If not, add a control and connect it.  Also, add a CSS class to this control, and call it something like "cssUrlLinks".

 

 

4. Finally, go into the Form Settings -> Custom JavaScript and add the above JavaScript.

Support Info

Vadim Tabakman - Nintex Forms for Office 365 - Dynamically Generated Hyperlinks - Vadim Tabakman

Compatibility

Nintex Forms O365

Nintex Workflow O365

Platform

Office 365

Screenshots

Here is the JavaScript that is required in the form to get the information so that you can build up the Hyperlinks on the form.

 

NWF.FormFiller.Events.RegisterAfterReady(function ()  {  var sRichText = '';  var myObj = NWF$('.cssUrlLinks .nf-filler-control-border .nf-filler-control-inner input');   var urls = myObj.val().split(';');  for (var index in urls)  {   sRichText += 'Document-' + index + '';  }    var myHyperlinks = NWF$('.cssHyperlinks');   myHyperlinks.html(sRichText);    NWF$('.cssUrlLinks').toggle(); });

 

Additional Information

The above JavaScript will create links with names like Document-0, Document-1 etc.

If you want to be smarter, your workflow that builds up the URLs can do something cool like DisplayName,URL;DisplayName;URL.

Notice the DisplayName and URL is comma-delimited.  Your JavaScript would need to be updated to split on semi-colons and then split on commas so that you have a URL and a nice Display Name for the link (it could be the document name).

Nintex Xchange Terms of Use Policy

Nintex makes no warranty or guarantee about the reliability, performance, quality, or functionality of any assets, and any assets you install are therefore provided as is. By downloading this asset, you agree to the terms of use.
2 people found this helpful

Outcomes