cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

How to pull task URL and update list item with it

Jump to solution

Within a workflow, I would like to pull the Task URL and update the list item with it. I can't see an easy/clean way to do this. Ideally, I would end up with a list column titled Task URL and 'Link' listed for each item. The link would direct the user to the task form to be filled out. Trying to avoid email. 

Thanks. 

Labels: (1)
Reply
11 Replies
Workflow Hero

Re: How to pull task URL and update list item with it

Jump to solution

Hi Brittany,

I also had similar requirement, but I don't see a way to achieve this.

Thanks,

Krishna.

0 Kudos
Reply
Workflow Hero

Re: How to pull task URL and update list item with it

Jump to solution

I know for sure you can do this in On Prem, not 100% sure you can with o365... but you just need to store the task ID into a variable when you create the task. Then use a build string to create the URL

https://sharepoint.com/sites/testsite/Lists/Workflow%20Tasks/EditForm.aspx?ID={TaskIDVariable} , Link

The update list item action.

If you need something more detailed, let me know and I can document it.

Reply
Workflow Hero

Re: How to pull task URL and update list item with it

Jump to solution

Went ahead and did it anyways for ya! Because I was curious myself! Works like a charm.

In your target list, create a Hyperlink column and name it whatever you'd like.

Create an int variable for the Task ID (This is at the bottom of the Assign a Task Action

Create a build string action and use the static URL to tasks on the task list.

Change "Workflow%20Tasks" if you've renamed it to something else, but that one is default. Set the ID = to the name of the variable above. Add a "," after and whatever you put next will be the name of the link

Use a "Create List Item" Or an "Update List item" action to write the URL (varTaskLink above) to the target list

Target list now has URL to task

Reply
Workflow Hero

Re: How to pull task URL and update list item with it

Jump to solution

I'm beyond excited to try this - thanks for the response!

One question.. where in the workflow do I put the Build String action? If I put it after the Assign Task, will it only execute if the task is completed? 

0 Kudos
Reply
Workflow Hero

Re: How to pull task URL and update list item with it

Jump to solution

You have to uncheck "Wait for task completion" then add it after

If you need it to stop, you can always add a condition, wait until, or filter after it.

Reply
Workflow Hero

Re: How to pull task URL and update list item with it

Jump to solution

Ahh got it. So if I needed to have actions execute based on the task outcome, I would just add conditions? If approved, send email, update list item, etc etc. 

Reply
Workflow Hero

Re: How to pull task URL and update list item with it

Jump to solution

Correct! Speaking of correct, can you mark my answer as correct when you get a chance? :-p

Any other questions, let me know!

Reply
Workflow Hero

Re: How to pull task URL and update list item with it

Jump to solution

It worked beautifully after the task executed. When I switched it to 'wait for task completion, I'm getting this error when trying to publish: Error publishing workflow. TypeConverter cannot convert from System.String.

I think it's because I'm trying to pull the Task Outcome.. maybe. I have the assign task action, then the build string/update list item actions. Then trying to grab the task outcome and put it in a variable.. but I think I am doing that wrong. From there a bunch of conditional branches depending on the task outcome.  

0 Kudos
Reply
Workflow Hero

Re: How to pull task URL and update list item with it

Jump to solution

That error seems like you may be using the wrong variable type for something. When you save the build string and put it in a variable, make sure it's text. The TaskID should be Integer. If you want to capture the outcome, you'll need to query the task list. that can be done by using the Task ID that you stored from Assigning the task. query the task list, add a filter where ID=varTaskID then the column you want is one of the "Nintex Task Outcomes" that have guids behind them.

Reply