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,004 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
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

SharePoint Designer 2010 has tools and commands to do everything that can be done with web parts in the browser, and then some – except uploading a web part straight into a page that is edited in SPD. So, can it be done? Scenario For a recent pr…
We had a requirement to extract data from a SharePoint 2010 Customer List into a CSV file and then place the CSV file into a directory on the network so that the file could be consumed by an AS400 system. I will share in Part 1 how to Extract the Da…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

706 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now