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

Office 365 Advanced Training for Admins

Special Offer:  Buy 1 course, get 2nd free!  Buy the 'Managing Office 365 Identities & Requirements' course w/ Accelerated TestPrep, and automatically receive the 'Enabling Office 365 Services' course FREE!

Question has a verified solution.

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

Suggested Solutions

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…
I thought I'd write this up for anyone who has a request to create an anonymous whistle-blower-type submission form created using SharePoint 2010 (this would probably work the same for 2013). It's not 100% fool-proof but it's as close as you can get…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

738 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