1

I have a SharePoint Designer workflow in 2010. This workflow is associated with a list and when it is run, should copy the Current Item back into the list then update a field in that newly created item with a variable set at initiation of the workflow. Basically it duplicates an item then changes 1 value of the newly created item. I'm using the Copy List Item Extended Activity from CodePlex to copy the item.

The field that I need to update is a lookup field into another list. For some reason SharePoint does not like this and errors out each time.

I have tried setting the value of the field to the following things, all of which fail when run.

ID of the lookup item
ID;#VALUE of the lookup item
VALUE of the lookup item
1;#201101 which is a hardcoded value I know is correct...just trying to test here

At this point, I am out of ideas. Can anyone help?

For more detail the workflow has 1 step with the following actions:

  1. Copy item in Current Item to list at [Parameter:ListURL], Do no Overwrite existing items. Store resulting list item id in [Variable:DuplicateID].
  2. then set [Variable:Reporting Month ID] to [Reporting Months:ID]. (this is a lookup into Reporting Months list using variable [Variable:Reporting Month] which is set at initiation of workflow).
  3. then Update item in Current List (the item is determined by [Variable:DuplicateID] and I try to set the value of the Reporting Month field in Current List using various combinations [Variable:Reporting Month ID] and [Variable:Reporting Month]

The error I get when the worflow is run is below.

The workflow could not update the item, possibly because one or more columns for the item require a different type of information.

2
  • So here is what I have been able to determine. If I change the workflow to just update the Current Item, everything works fine. If I also change the workflow to copy the item, then update the newly created item with a hardcoded ID, it works. What does not work is copying the item and then trying to dynamically update the value. I have no idea why yet. Still researching.
    – thomas
    Aug 30, 2011 at 15:24
  • Please ensure you provide all relevant information when asking a question, or else the community ends up wasting its time. You didn't mention "Copy List Item Extended" in your post which turned out to be a valuable piece of information. Thanks.
    – Alex Angas
    Sep 1, 2011 at 22:58

3 Answers 3

1

I figured it out. The "Copy List Item Extended" action does not seem to enjoy the Current Item. Instead I had to copy from the Current List and join/filter on the Current Item:ID column.

No idea why but it works now.

Step 1 (Set Variables) Action 1: Set Variable: New Reporting Month ID to Reporting Months:ID

Step 2 (Duplicate Current List Item Back into List) Action 1: Copy item in Current List to list a Parameters: ListURL, Overwrite existing items. Store resulting list item id in Variable: New Item ID

Step 3 (Update New Item Reporting Month) Action 1: Update item in Current List

2
  • Copy List Item Extended isn't a standard SharePoint Designer workflow action which is probably why you were experienceing issues. Sep 1, 2011 at 19:02
  • Thomas, Can you please share screenshot for the solution figured out.
    – user46984
    Sep 15, 2015 at 2:21
0

I have found I can often get around this error by assigning the value to a variable first, followed by assigning the variable to the field. But I see you are already doing this.

I will add a lookup field has both an index and a value concatenated together. Logging the text of the field before you write to it may help see if the value is in the correct format.

1
  • i feel i have tried every possible combination of ID and value pair for this. Even used an Integer variable and hardcoded an integer value of 1. Still does not work. The value of the field before setting is 8;#201108 and I have tried 8, 201108, 8;#201108, etc.
    – thomas
    Aug 29, 2011 at 22:14
0

What datatype are your workflow variables? SP 2010 Designer workflows are looking for an integer to be passed in for the ID of the targeted lookup item.

In 2010 Designer workflows I haven't had to mess around with id;#value formatting. It just accepts the ID as long as I pass it an integer.

1
  • the data types are integers for the ID column. I have also tried the List Item ID type.
    – thomas
    Aug 29, 2011 at 21:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.