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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Work Over Net is a new and very powerful collaboration product. With its new easy interface it is becoming very competitive to other similar products like webex and office interactive. WON 2010 have the standard business tools needed for multi-offic…
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…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

920 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

15 Experts available now in Live!

Get 1:1 Help Now