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

Create List and Update it

Jump to solution

I am stumped here. I want to create a task list from a template that contains a set of standard task (about 8) already in it.  Then I want to update the due date on the new task list from a calculated date I create earlier in my workflow.  My issues is 

1. each task date is different 

2.  I am not sure how to update a task list that doesn't exist.  I thought about doing a web services call but would I have to do that for EACH item?(There will be about 8)

I could create a blank task list and then add each task with a due date but again I am not sure how to do so since each task is different. Maybe create item and then list out all 8?  This seems rather ineffective but maybe I have to do so. 

what I have is  a List as so I run a workflow on create of these items that make the Task list for Math

Program Review    Start Date

1. Math               5/1/2018

2. Science            6/1/2018

Task List                Due Date

1 Set Meeting       -7 Start Date

2 Set Site Visit      +30 Start Date  

Any help would be appreciated.

BTW I have Sharpoint 2013 on-prem and Nintext for same.

Tags (1)
0 Kudos
Reply
7 Replies
Workflow Hero

Re: Create List and Update it

Jump to solution

  I am not sure how to update a task list that doesn't exist.  I thought about doing a web services call

yes that's only option if a list doesn't exists at design time.

would I have to do that for EACH item?(There will be about 8)

you can make it with single web service call/action.

see webservice documentation, there are examples how to perform an action on multiple items within single batch.

Lists.UpdateListItems method (WebSvcLists) 

0 Kudos
Reply
Workflow Hero

Re: Create List and Update it

Jump to solution

you can make it with single web service call/action.

see webservice documentation, there are examples how to perform an action on multiple items within single batch.

Lists.UpdateListItems method (WebSvcLists)---I am sorry I don't understand how this can be done in a single web call because the due date changes for each item, can you explain or show an example.

 

0 Kudos
Reply
Workflow Hero

Re: Create List and Update it

Jump to solution

you need to build batch XML like

<Method ID="1" Cmd="Update">
  <Field Name="ID">4</Field>
  <Field Name="Field_DateTime">{WorkflowVariableSmiley Very HappyateForItem4}</Field>
</Method>
<Method ID="2" Cmd="Update">
  <Field Name="ID" >6</Field>
  <Field Name="Field_DateTime">{WorkflowVariableSmiley Very HappyateForItem6}</Field>
</Method>
0 Kudos
Reply
Workflow Hero

Re: Create List and Update it

Jump to solution

So I created

<Batch OnError="Continue" ListVersion="1" >
<Method ID="1" Cmd="Update">
<Field Name="ID">4</Field>
<Field Name="DueDate">{WorkflowVariableSmiley Very Happyate1}</Field>
</Method>
<Method ID="2" Cmd="Update">
<Field Name="ID" >6</Field>
<Field Name="DueDate">{WorkflowVariableSmiley Very Happyate2}</Field>
</Method>
</Batch>

and ran the workflow which completes with no errors however it does not update the Due Date column

Any Idean what maybe the issue I am trying to update the standard Due Date in a task list the internal mane is DueDate.

my Web method is UpdateListItems

0 Kudos
Reply
Workflow Hero

Re: Create List and Update it

Jump to solution

what're datatypes of Date variables?

what format do you supply dates to the web service in?

0 Kudos
Reply
Workflow Hero

Re: Create List and Update it

Jump to solution

what're datatypes of Date variables? The variables are date types I have to do a Calculate date on them first whatworkflow steps

format do you supply dates to the web service in? I don't have a way to change unless I did a build string or something before setting them, this is how they show in the log. 

Date 1: 4/7/2018 12:00 AM
Date 2: 3/24/2018 12:00 AM
0 Kudos
Reply
Workflow Hero

Re: Create List and Update it

Jump to solution

that's the problem I guess.

you have to supply date in ISO format, like 2018-03-24T00:00:00Z

and it has to be string not a DateTime.

calculate date option has an option to get calculation result as a ISO formatted string.  so try it this way.

0 Kudos
Reply