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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

I recently came across an issue with a MOSS 2007 deployment where access into some sub-sites were denied, even for the MOSS farm administrators. A bit of background to the setup of this MOSS farm; this was a three server setup, consisting of a fr…
There is one common problem that all we SharePoint developers share: custom solution deployment. This topic can't be covered fully in this short article, so all I want to do in this one is to review it from a development-to-operations perspectiv…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

770 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