Solved

Can I set a Workflow Variable of type List Item ID to a specific number value in SharePoint Designer 2007

Posted on 2011-02-25
2
1,021 Views
Last Modified: 2012-05-11
Here's another SharePoint Designer Workflows question that I hope I can get an answer too. This is the situation. I have two lists on a site. One list is a course list, the second is a list for trainee records. When a new trainee is added to the list, I had a workflow set up that would populate the list with a record for every course that each trainee should take, based on a selected role. The workflow ran fine until I decided to change it because the links between the lists were based on the course titles rather than the course list's item IDs. So of course there were all kinds of potentials for broken workflow if the course name was unwittingly changed, etc.

I went through and rebuilt the workflow using the ID and workflow variables to store it. Of course, it is failing due to an "Unknown Error".

Here's an example of what part of the workflow looks like:
(For reference, CLID is a lookup field in a list titled "Training Tasks" that points to the ID field on the list "Course List". RefCLID is a workflow variable of type "List Item ID".)

Set Variable:RefCLID to 1
     Then set CLID to Course List:ID (where Course List:ID = Variable:RefCLID)

There are also several Create Item actions that set a "Course" lookup field to Course List:ID where Course List:ID = Variable:RefCLID. So for example:

Set Variable:RefCLID to 2
then Create item in Training Tasks
then Set Variable:RefCLID to 3
then Create item in Training Tasks
etc.

There are about 14 list items created in total, or there would be if the workflow didn't error out. As I said, it worked before I changed to this format, when I used the course titles as the reference instead of the List Item ID.

My question is this: is it possible to do what I did above, setting a variable of type List Item ID to a numeric value or is this why my workflow is failing? If so, how can I fix it?
0
Comment
Question by:cjones_mcse
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 5

Accepted Solution

by:
navdeepmadan earned 500 total points
ID: 34994702
Yes it's possible what you are doing.
But the problem with the sharepoint workflow is there is not upgrade path of the working for the exsisting running workflow.
You create the new workflow and installed it with the new name and it will work fine,
0
 
LVL 10

Author Comment

by:cjones_mcse
ID: 34999296
Thanks! Creating the new workflow fixed the problem!
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Scenario: Let’s say you have a quote worksheet in Excel that you use to work up sales figures and such for your clients. You utilize SharePoint to manage and keep track of these documents. You would like values from your worksheet to populate Sh…
Pimping Sharepoint 2007 without Server-Side Code Part 1 One of my biggest frustrations with Sharepoint 2007 in the corporate world is that while good-intentioned managers lock down the more interesting capabilities of Sharepoint programming in…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question