Javascript Nintex Forms for Office 365 – Dynamically Generated Hyperlinks

Today, I had a request on how to create links to documents in a Nintex Form (O365), but specifically in a Task form that was created from Nintex Workflow for Office 365.  It’s an interesting question, since at this stage, we don’t have access to Nintex Workflow variables in the Nintex Form.

We can however create dynamically generated hyperlinks by using Javascript Nintex Forms.

I figured 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.

But, here is the JavaScript code that is required in the Javascript Nintex Form to get the information so that you can build up the Hyperlinks on the form.

Javascript-Nintex-Forms

There are a few requirements for the Javascript Nintex Form 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.

Enhancement

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).

Evoke Technologies & Nintex: Bringing Advanced Workflows to Enterprises

When compared to SharePoint, Nintex is highly user-friendly and offers powerful features. It provides functionalities like querying SQL, LDAP and web service during the workflow phases. This certified partnership improves our clients user experience and delivers tangible ROI.

Call Evoke Technologies at +1 (937) 202-4161 (Select Option 2 for Sales) or find out more about how simplified solutions for everyday challenges can be at your fingertips now.

Javascript Nintex Forms | Nintex Forms Javascript

%d bloggers like this: